mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
test(oxlint): improve disabling "no-nested-ternary" tests (#8814)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
8ce21d1d48
commit
2b83b71b94
6 changed files with 34 additions and 17 deletions
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"plugins": [],
|
||||
"rules": {
|
||||
"eslint/no-nested-ternary": "off"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"plugins": [
|
||||
"oxc",
|
||||
"unicorn"
|
||||
],
|
||||
"rules": {
|
||||
"eslint/no-nested-ternary": "off",
|
||||
"unicorn/no-nested-ternary": "off"
|
||||
}
|
||||
}
|
||||
|
|
@ -825,10 +825,13 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn test_two_rules_with_same_name_from_different_plugin_names() {
|
||||
fn test_disable_eslint_and_unicorn_alias_rules() {
|
||||
// Issue: <https://github.com/oxc-project/oxc/issues/8485>
|
||||
let args = &["-c", ".oxlintrc.json", "test.js"];
|
||||
Tester::new().with_cwd("fixtures/two_rules_with_same_name".into()).test_and_snapshot(args);
|
||||
let args_1 = &["-c", ".oxlintrc-eslint.json", "test.js"];
|
||||
let args_2 = &["-c", ".oxlintrc-unicorn.json", "test.js"];
|
||||
Tester::new()
|
||||
.with_cwd("fixtures/disable_eslint_and_unicorn_alias_rules".into())
|
||||
.test_and_snapshot_multiple(&[args_1, args_2]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
source: apps/oxlint/src/tester.rs
|
||||
---
|
||||
##########
|
||||
arguments: -c .oxlintrc-eslint.json test.js
|
||||
working directory: fixtures/disable_eslint_and_unicorn_alias_rules
|
||||
----------
|
||||
Found 0 warnings and 0 errors.
|
||||
Finished in <variable>ms on 1 file with 48 rules using 1 threads.
|
||||
----------
|
||||
CLI result: LintSucceeded
|
||||
----------
|
||||
|
||||
##########
|
||||
arguments: -c .oxlintrc-unicorn.json test.js
|
||||
working directory: fixtures/disable_eslint_and_unicorn_alias_rules
|
||||
----------
|
||||
Found 0 warnings and 0 errors.
|
||||
Finished in <variable>ms on 1 file with 61 rules using 1 threads.
|
||||
----------
|
||||
CLI result: LintSucceeded
|
||||
----------
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
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
|
||||
----------
|
||||
Loading…
Reference in a new issue