-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linter): can't disable
no-nested-ternary
rule anymore (#8600)
closes #8485 Since we currently support two rules with the same `rule_name` but different `plugin_names`, some of the original logic is no longer applicable. As a result, I have made some adjustments.
- Loading branch information
Showing
5 changed files
with
73 additions
and
33 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
apps/oxlint/fixtures/two_rules_with_same_name/.oxlintrc.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,10 @@ | ||
{ | ||
"plugins": [ | ||
"oxc", | ||
"unicorn" | ||
], | ||
"rules": { | ||
"eslint/no-nested-ternary": "off", | ||
"unicorn/no-nested-ternary": "off" | ||
} | ||
} |
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 @@ | ||
console.log(bar ? baz : qux === quxx ? bing : bam); |
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
12 changes: 12 additions & 0 deletions
12
...nt/src/snapshots/fixtures__two_rules_with_same_name_-c .oxlintrc.json test.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,12 @@ | ||
--- | ||
source: apps/oxlint/src/tester.rs | ||
--- | ||
########## | ||
arguments: -c .oxlintrc.json test.js | ||
working directory: fixtures/two_rules_with_same_name | ||
---------- | ||
Found 0 warnings and 0 errors. | ||
Finished in <variable>ms on 1 file with 74 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