Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions apps/oxlint/src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,13 +971,11 @@ mod test {

#[test]
fn test_overrides() {
let args_1 =
&["-c", "fixtures/cli/overrides/.oxlintrc.json", "fixtures/cli/overrides/test.js"];
let args_2 =
&["-c", "fixtures/cli/overrides/.oxlintrc.json", "fixtures/cli/overrides/test.ts"];
let args_3 =
&["-c", "fixtures/cli/overrides/.oxlintrc.json", "fixtures/cli/overrides/other.jsx"];
Tester::new().test_and_snapshot_multiple(&[args_1, args_2, args_3]);
// This is split into three to avoid creating a snapshot with a filename too large to be usable on Windows.
let tester = Tester::new().with_cwd("fixtures/cli/overrides".into());
tester.test_and_snapshot(&["-c", ".oxlintrc.json", "test.js"]);
tester.test_and_snapshot(&["-c", ".oxlintrc.json", "test.ts"]);
tester.test_and_snapshot(&["-c", ".oxlintrc.json", "other.jsx"]);
}

#[test]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
source: apps/oxlint/src/tester.rs
---
##########
arguments: -c .oxlintrc.json other.jsx
working directory: fixtures/cli/overrides
----------

x eslint(no-var): Unexpected var, use let or const instead.
,-[other.jsx:1:1]
1 | var msg = "hello";
: ^^^
2 | console.log(msg);
`----
help: Replace var with let or const

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file with 95 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
source: apps/oxlint/src/tester.rs
---
##########
arguments: -c .oxlintrc.json test.js
working directory: fixtures/cli/overrides
----------

x eslint(no-var): Unexpected var, use let or const instead.
,-[test.js:1:1]
1 | var msg = "hello";
: ^^^
2 | console.log(msg);
`----
help: Replace var with let or const

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file with 95 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
source: apps/oxlint/src/tester.rs
---
##########
arguments: -c .oxlintrc.json test.ts
working directory: fixtures/cli/overrides
----------

x eslint(no-var): Unexpected var, use let or const instead.
,-[test.ts:1:1]
1 | var msg = "hello";
: ^^^
2 | console.log(msg);
`----
help: Replace var with let or const

! eslint(no-console): Unexpected console statement.
,-[test.ts:2:1]
1 | var msg = "hello";
2 | console.log(msg);
: ^^^^^^^^^^^
`----
help: Delete this console statement.

Found 1 warning and 1 error.
Finished in <variable>ms on 1 file with 95 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Loading