oxc/crates/oxc_cli/src
Cameron 9275c749ca
feat(linter) Parse eslint configuration (#1146)
**DRAFT**

Adds support for parsing `eslint` configuration files.

Example: 
```sh
cargo run --bin=oxc_cli lint --config-path ./.eslintrc.json .
```

This isn't a full implementation of how eslint parses configs but should
be fine for now:

Currently supported `extends`:
 - `eslint:recommended` -> `eslint`
 - `plugin:react/recommended` -> `react`
 - `plugin:@typescript-eslint/recommended` -> `typescript`
 - `plugin:react-hooks/recommended` -> `react`
 - `plugin:unicorn/recommended` -> `unicorn`
 - `plugin:jest/recommended` -> `jest`

These defaults can _all_ be overridden by configuring the rule in the
`rules` section of the estlint config:

e.g.
```json
{
    "extends": [
        "eslint:recommended"
    ],
    "rules": {
        "eqeqeq": "off"
    },
}
```

This would enable of of the rules within the `eslint` group. But would
not enable `eqeqeq` as it is explicitly disabled

Note, we do not currently support the following:
 - supplying a `filter` and `config-path`
 - supplying a `plugin` and `config-path`
2023-12-14 16:29:27 +08:00
..
format feat(prettier): turn off preserve_parens and start working on need-parens (#1487) 2023-11-21 16:26:56 +00:00
lint feat(linter) Parse eslint configuration (#1146) 2023-12-14 16:29:27 +08:00
type_check refactor(clippy): allow struct_excessive_bools 2023-10-16 15:18:07 +08:00
codeowners.rs Codeowners filtering (#1083) 2023-10-29 13:30:20 +08:00
command.rs feat(linter) Parse eslint configuration (#1146) 2023-12-14 16:29:27 +08:00
git.rs feat(cli): introduce pretty errors (#111) 2023-03-04 20:40:07 -08:00
lib.rs feat(cli): add basic prettier cli infrastructure (#1300) 2023-11-14 08:22:22 +00:00
main.rs feat(cli): add basic prettier cli infrastructure (#1300) 2023-11-14 08:22:22 +00:00
result.rs feat(cli): add --deny-warnings flag (#1452) 2023-11-21 10:08:10 +08:00
runner.rs refactor(cli): remove unused lint/error.rs (#792) 2023-08-25 16:46:26 +08:00
walk.rs Codeowners filtering (#1083) 2023-10-29 13:30:20 +08:00