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
3 changes: 3 additions & 0 deletions apps/oxlint/fixtures/auto_config_detection/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "off"
},
"rules": {
"no-debugger": "error"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "off"
},
"plugins": [
"import"
],
Expand Down
3 changes: 3 additions & 0 deletions apps/oxlint/fixtures/ignore_file_current_dir/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "off"
},
"ignorePatterns": [
"foo.js",
"a/bar.js"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"categories": {
"correctness": "off"
},
"rules": {
"no-debugger": "warn"
},
"ignorePatterns": ["nested/*.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "off"
},
"rules": {
"no-debugger": "error"
},
Expand Down
3 changes: 3 additions & 0 deletions apps/oxlint/fixtures/import/.oxlintrc-import-x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"plugins": ["import"],
"categories": {
"correctness": "off"
},
"rules": {
"import-x/no-default-export": "error",
"import-x/namespace": "allow"
Expand Down
3 changes: 3 additions & 0 deletions apps/oxlint/fixtures/import/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"plugins": ["import"],
"categories": {
"correctness": "off"
},
"rules": {
"import/no-default-export": "error",
"import/namespace": "allow"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"rules": {
"no-debugger": "error",
"no-unused-vars": "warn"
}
}
"categories": {
"correctness": "off"
},
"rules": {
"no-debugger": "error",
"no-unused-vars": "warn"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ working directory: fixtures/auto_config_detection
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ working directory: fixtures/cross_module_extended_config
-> ./dep-b.ts - fixtures/cross_module_extended_config/dep-b.ts

Found 0 warnings and 2 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ working directory: fixtures/cross_module_nested_config
-> ./folder-dep-b.ts - fixtures/cross_module_nested_config/folder/folder-dep-b.ts

Found 0 warnings and 2 errors.
Finished in <variable>ms on 4 files using 1 threads.
Finished in <variable>ms on 4 files with 90 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ arguments: test.jsx test2.d.ts
working directory: fixtures/disable_directive_issue_13311
----------
Found 0 warnings and 0 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 3 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ working directory: fixtures/extends_config
help: Provide an `href` for the `a` element.

Found 1 warning and 3 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 90 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ arguments:
working directory: fixtures/ignore_file_current_dir
----------
Found 0 warnings and 0 errors.
Finished in <variable>ms on 0 files using 1 threads.
Finished in <variable>ms on 0 files with 1 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Expand All @@ -16,7 +16,7 @@ arguments: .
working directory: fixtures/ignore_file_current_dir
----------
Found 0 warnings and 0 errors.
Finished in <variable>ms on 0 files using 1 threads.
Finished in <variable>ms on 0 files with 1 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ working directory: fixtures/ignore_patterns_relative
help: Remove the debugger statement

Found 2 warnings and 0 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 1 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Expand All @@ -46,7 +46,7 @@ working directory: fixtures/ignore_patterns_relative
help: Remove the debugger statement

Found 2 warnings and 0 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 1 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ arguments:
working directory: fixtures/ignore_patterns_symlink
----------
Found 0 warnings and 0 errors.
Finished in <variable>ms on 0 files using 1 threads.
Finished in <variable>ms on 0 files with 90 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Expand All @@ -16,7 +16,7 @@ arguments: .
working directory: fixtures/ignore_patterns_symlink
----------
Found 0 warnings and 0 errors.
Finished in <variable>ms on 0 files using 1 threads.
Finished in <variable>ms on 0 files with 90 rules using 1 threads.
----------
CLI result: LintSucceeded
----------
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ working directory: fixtures/ignore_patterns_whitelist
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Expand All @@ -32,7 +32,7 @@ working directory: fixtures/ignore_patterns_whitelist
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ working directory: fixtures/import
`----

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file with 55 rules using 1 threads.
Finished in <variable>ms on 1 file with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Expand All @@ -34,7 +34,7 @@ working directory: fixtures/import
`----

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file with 55 rules using 1 threads.
Finished in <variable>ms on 1 file with 1 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ working directory: fixtures/output_formatter_diagnostic
help: Remove the debugger statement

Found 2 warnings and 1 error.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 2 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ working directory: fixtures/output_formatter_diagnostic
{"message": "Function 'foo' is declared but never used.","code": "eslint(no-unused-vars)","severity": "warning","causes": [],"url": "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html","help": "Consider removing this declaration.","filename": "test.js","labels": [{"label": "'foo' is declared here","span": {"offset": 9,"length": 3,"line": 1,"column": 10}}],"related": []},
{"message": "Parameter 'b' is declared but never used. Unused parameters should start with a '_'.","code": "eslint(no-unused-vars)","severity": "warning","causes": [],"url": "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html","help": "Consider removing this parameter.","filename": "test.js","labels": [{"label": "'b' is declared here","span": {"offset": 16,"length": 1,"line": 1,"column": 17}}],"related": []}],
"number_of_files": 1,
"number_of_rules": null,
"number_of_rules": 2,
"threads_count": 1,
"start_time": <variable>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ working directory: fixtures/tsgolint
----------

Found 0 warnings and 51 errors.
Finished in <variable>ms on 45 files using 1 threads.
Finished in <variable>ms on 45 files with 44 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ working directory: fixtures/tsgolint
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 44 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ working directory: fixtures/tsgolint
`----

Found 0 warnings and 51 errors.
Finished in <variable>ms on 45 files using 1 threads.
Finished in <variable>ms on 45 files with 44 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ working directory: fixtures/tsgolint_rule_options
`----

Found 0 warnings and 4 errors.
Finished in <variable>ms on 1 file using 1 threads.
Finished in <variable>ms on 1 file with 6 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ working directory: fixtures/tsgolint_type_error
`----

Found 0 warnings and 1 error.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 2 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ working directory: fixtures
-> ./b - fixtures/issue_10054/b.ts

Found 0 warnings and 2 errors.
Finished in <variable>ms on 2 files using 1 threads.
Finished in <variable>ms on 2 files with 90 rules using 1 threads.
----------
CLI result: LintFoundErrors
----------
2 changes: 1 addition & 1 deletion apps/oxlint/test/fixtures/basic/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
help: Remove the debugger statement

Found 1 warning and 1 error.
Finished in Xms on 1 file using X threads.
Finished in Xms on 1 file with 90 rules using X threads.
```

# stderr
Expand Down
3 changes: 3 additions & 0 deletions apps/oxlint/test/fixtures/basic_many_files/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "warn" // explicitly enable this so we can ensure import rules are enabled.
},
"jsPlugins": ["./plugin.ts"],
"plugins": ["import"],
"rules": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
help: Remove the debugger statement

Found 20 warnings and 20 errors.
Finished in Xms on 20 files using X threads.
Finished in Xms on 20 files with 55 rules using X threads.
```

# stderr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"categories": {
"correctness": "off"
},
"jsPlugins": ["./plugin.ts"],
"rules": {
"basic-custom-plugin/no-debugger": "error",
"basic-custom-plugin/no-debugger-2": "error",
"basic-custom-plugin/no-identifiers-named-foo": "error"
"basic-custom-plugin/no-identifiers-named-foo": "error",
"eslint/no-debugger": "warn"
}
}
12 changes: 2 additions & 10 deletions apps/oxlint/test/fixtures/basic_multiple_rules/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,8 @@
: ^^^
`----

! ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-expressions.html\eslint(no-unused-expressions)]8;;\: Expected expression to be used
,-[files/index.js:3:1]
2 |
3 | foo;
: ^^^^
`----
help: Consider using this expression or removing it

Found 2 warnings and 3 errors.
Finished in Xms on 1 file using X threads.
Found 1 warning and 3 errors.
Finished in Xms on 1 file with 1 rules using X threads.
```

# stderr
Expand Down
3 changes: 3 additions & 0 deletions apps/oxlint/test/fixtures/basic_no_errors/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"categories": {
"correctness": "off"
},
"jsPlugins": ["./plugin.ts"],
"rules": {
"basic-custom-plugin/no-debugger": "error"
Expand Down
2 changes: 1 addition & 1 deletion apps/oxlint/test/fixtures/basic_no_errors/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# stdout
```
Found 0 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
Finished in Xms on 1 file with 0 rules using X threads.
```

# stderr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"categories": {
"correctness": "off"
},
"jsPlugins": ["./plugin.ts"],
"rules": {
"basic-custom-plugin/no-debugger": "warn"
"basic-custom-plugin/no-debugger": "warn",
"eslint/no-debugger": "warn"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
help: Remove the debugger statement

Found 2 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
Finished in Xms on 1 file with 1 rules using X threads.
```

# stderr
Expand Down
2 changes: 1 addition & 1 deletion apps/oxlint/test/fixtures/built_in_errors/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
help: Remove the debugger statement

Found 0 warnings and 1 error.
Finished in Xms on 1 file using X threads.
Finished in Xms on 1 file with 1 rules using X threads.
```

# stderr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# stdout
```
Found 0 warnings and 0 errors.
Finished in Xms on 1 file using X threads.
Finished in Xms on 1 file with 1 rules using X threads.
```

# stderr
Expand Down
Loading
Loading