-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linter):
ignorePatterns
does not work when files are provided a…
…s command arguments (#8590) closes #8505 Here is why this issue occurs: https://github.com/oxc-project/oxc/blob/c15af02e52e124f3968b098d487e28b49d937b56/apps/oxlint/src/lint.rs#L66-L70
- Loading branch information
Showing
8 changed files
with
167 additions
and
51 deletions.
There are no files selected for viewing
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions
5
apps/oxlint/fixtures/config_ignore_patterns/with_oxlintrc/test/eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"*.js" | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...on__eslintrc.json fixtures__config_ignore_patterns__ignore_extension__main.js@oxlint.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: apps/oxlint/src/tester.rs | ||
--- | ||
########## | ||
arguments: -c fixtures/config_ignore_patterns/ignore_extension/eslintrc.json fixtures/config_ignore_patterns/ignore_extension/main.js | ||
working directory: | ||
---------- | ||
---------- | ||
CLI result: LintNoFilesFound | ||
---------- |
18 changes: 18 additions & 0 deletions
18
...ore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: apps/oxlint/src/tester.rs | ||
--- | ||
########## | ||
arguments: -c ./test/eslintrc.json --ignore-pattern *.ts . | ||
working directory: fixtures/config_ignore_patterns/with_oxlintrc | ||
---------- | ||
|
||
! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-empty-file.html\eslint-plugin-unicorn(no-empty-file)]8;;\: Empty files are not allowed. | ||
,-[main.js:1:1] | ||
`---- | ||
help: Delete this file or add some code to it. | ||
Found 1 warning and 0 errors. | ||
Finished in <variable>ms on 1 file with 97 rules using 1 threads. | ||
---------- | ||
CLI result: LintSucceeded | ||
---------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters