oxc/crates
Clark Fischer d88d76fdb8
Prioritize ignored paths when linting (#1878)
As discussed in #1124

A common workflow is running `oxlint` automatically via something like
lint-staged, which passes all changed file paths explicitly as CLI
arguments. The ignore crate auto-whitelists explicit paths, overriding
anything defined in an ignore file, leading to files that should be
ignored causing CI and VC hooks to fail.

eslint avoids this issue by giving precedence to .eslintignore unless
you pass `--no-ignore`.

Since `ignore` doesn't really give much control over this, the most
effective solution seems to be filtering. ~~Once we've got a list of
files to be linted, we can compare each against the .eslintignore and
see if it really truly should be linted.~~

~~Unfortunately, this is sort of a naive solution. Ignored directories
will still be walked, then filtered out after the fact. Changing this
behavior at the walker level would affect the formatter, which probably
isn't desirable.~~ (edit: The performance impact has been mostly
resolved.)

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2024-01-04 03:44:10 +00:00
..
oxc Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_allocator Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_ast fix(ast): implement GetSpan for JSXElement (#1861) 2023-12-31 22:08:11 +08:00
oxc_cli Prioritize ignored paths when linting (#1878) 2024-01-04 03:44:10 +00:00
oxc_codegen Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_diagnostics chore(deps): bump the dependencies group with 11 updates (#1865) 2024-01-01 08:06:33 +00:00
oxc_formatter Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_index Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_js_regex Initialize JS Regex crates and def AST. (#1500) 2023-11-23 00:22:17 +08:00
oxc_language_server chore(lsp): normalize the lsp naming (#1873) 2024-01-03 11:48:18 +08:00
oxc_linter perf(semantic): check duplicate parameters in Binder of FormalParameters (#1840) 2024-01-03 12:57:03 +08:00
oxc_linter_plugin chore(deps): bump the dependencies group with 5 updates (#1808) 2023-12-25 15:17:47 +08:00
oxc_macros feat(linter): add a perf category (#1625) 2023-12-04 17:31:34 +08:00
oxc_minifier chore: upgrade rustc toolchain to stable 1.75.0 (#1853) 2023-12-29 12:20:51 +08:00
oxc_parser fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs (#1874) 2024-01-03 11:34:14 +08:00
oxc_prettier feat(linter): no-irregular-whitespace rule (#1835) 2023-12-31 12:05:38 +08:00
oxc_query feat(query): Add is_getter, is_setter, is_constructor to all Function implementors (#1526) 2023-11-27 12:22:41 +08:00
oxc_semantic feat(playground): visualize scope (#1882) 2024-01-03 16:10:42 +08:00
oxc_span Release crates v0.4.0 2023-12-08 17:20:37 +08:00
oxc_syntax feat(semantic): improve check super implementation, reduce access nodes (#1827) 2023-12-27 22:36:28 +08:00
oxc_transformer chore: upgrade rustc toolchain to stable 1.75.0 (#1853) 2023-12-29 12:20:51 +08:00
oxc_type_synthesis refactor(rust): move to workspace lint table (#1444) 2023-11-20 14:38:10 +08:00
oxc_wasm feat(playground): visualize scope (#1882) 2024-01-03 16:10:42 +08:00