Skip to content

Commit

Permalink
Fix bug that prevents lint diff code from running (#1510)
Browse files Browse the repository at this point in the history
* Fix bug that prevents lint diff code from running

* Add changeset for lint diff bug

Co-authored-by: Kathan Cheema <kathancheema@outlook.com>
  • Loading branch information
cheemcheem and Kathan Cheema authored Mar 28, 2022
1 parent 1503e78 commit 4846d21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twelve-days-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'modular-scripts': patch
---

Fix bug that prevented lint diff from running
2 changes: 1 addition & 1 deletion packages/modular-scripts/src/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function lint(
const lintExtensions = ['.ts', '.tsx', '.js', '.jsx'];
let targetedFiles = ['<rootDir>/**/src/**/*.{js,jsx,ts,tsx}'];

if (!all && !isCI && !regexes) {
if (!all && !isCI && regexes.length === 0) {
const diffedFiles = getDiffedFiles();
if (diffedFiles.length === 0) {
logger.log(
Expand Down

0 comments on commit 4846d21

Please sign in to comment.