oxc/crates/oxc_cli
fi3ework e0da12a868
fix(linter): allow eslintrc to add rule when overriding (#1984)
Fix a bug introduced in https://github.com/oxc-project/oxc/pull/1966.
Ideally, the rules in eslintrc should be merged into final rules as
described:

> The rules will start with the categories we apply, and then merge all
the configurations stated in the rules field.
>
> For example, if we begin with -D correctness with 80 rules, then
>
> "no-empty-file": "off" will remove the rule, yielding 79 rules
> "no-empty": "error" (restriction) will add the rule, yield 81 rules
> ""no-empty": ["error", { "allowEmptyCatch": true }]` add the rule's
configuration

However, the implementation did not include the newly added rules in the
eslintrc. As a test case and example, I added a new fixture to
`crates/oxc_cli/fixtures/no_undef`. No warn or deny will be found
without this PR.

This is my first Rust PR ever. Any nitpicking suggestions are welcome.
Thanks! 😊
2024-01-11 11:43:02 +08:00
..
fixtures fix(linter): allow eslintrc to add rule when overriding (#1984) 2024-01-11 11:43:02 +08:00
src fix(linter): allow eslintrc to add rule when overriding (#1984) 2024-01-11 11:43:02 +08:00
Cargo.toml chore(cli): the oxc_cli binary has no unit tests 2024-01-04 21:20:40 +08:00