oxc/crates/oxc_diagnostics/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
..
graphic_reporter.rs feat(oxc): a single oxc crate (#522) 2023-07-06 13:35:25 +08:00
graphical_theme.rs feat(oxc): a single oxc crate (#522) 2023-07-06 13:35:25 +08:00
lib.rs feat(linter) Parse eslint configuration (#1146) 2023-12-14 16:29:27 +08:00
service.rs Fix oxlint --quiet suppressing errors (#1008) 2023-10-18 11:00:27 +08:00