Skip to content

Commit 2b83b71

Browse files
Sysixautofix-ci[bot]
andauthoredJan 31, 2025··
test(oxlint): improve disabling "no-nested-ternary" tests (#8814)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 8ce21d1 commit 2b83b71

6 files changed

+34
-17
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [],
3+
"rules": {
4+
"eslint/no-nested-ternary": "off"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"plugins": [
3-
"oxc",
43
"unicorn"
54
],
65
"rules": {
7-
"eslint/no-nested-ternary": "off",
86
"unicorn/no-nested-ternary": "off"
97
}
108
}

Diff for: ‎apps/oxlint/src/lint.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -825,10 +825,13 @@ mod test {
825825
}
826826

827827
#[test]
828-
fn test_two_rules_with_same_name_from_different_plugin_names() {
828+
fn test_disable_eslint_and_unicorn_alias_rules() {
829829
// Issue: <https://github.com/oxc-project/oxc/issues/8485>
830-
let args = &["-c", ".oxlintrc.json", "test.js"];
831-
Tester::new().with_cwd("fixtures/two_rules_with_same_name".into()).test_and_snapshot(args);
830+
let args_1 = &["-c", ".oxlintrc-eslint.json", "test.js"];
831+
let args_2 = &["-c", ".oxlintrc-unicorn.json", "test.js"];
832+
Tester::new()
833+
.with_cwd("fixtures/disable_eslint_and_unicorn_alias_rules".into())
834+
.test_and_snapshot_multiple(&[args_1, args_2]);
832835
}
833836

834837
#[test]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
source: apps/oxlint/src/tester.rs
3+
---
4+
##########
5+
arguments: -c .oxlintrc-eslint.json test.js
6+
working directory: fixtures/disable_eslint_and_unicorn_alias_rules
7+
----------
8+
Found 0 warnings and 0 errors.
9+
Finished in <variable>ms on 1 file with 48 rules using 1 threads.
10+
----------
11+
CLI result: LintSucceeded
12+
----------
13+
14+
##########
15+
arguments: -c .oxlintrc-unicorn.json test.js
16+
working directory: fixtures/disable_eslint_and_unicorn_alias_rules
17+
----------
18+
Found 0 warnings and 0 errors.
19+
Finished in <variable>ms on 1 file with 61 rules using 1 threads.
20+
----------
21+
CLI result: LintSucceeded
22+
----------

Diff for: ‎apps/oxlint/src/snapshots/fixtures__two_rules_with_same_name_-c .oxlintrc.json test.js@oxlint.snap

-12
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.