oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
12.51k stars 458 forks source link

linter: add support "ignores" to config #7032

Open pumano opened 3 weeks ago

pumano commented 3 weeks ago

What version of Oxlint are you using?

0.10.3

What command did you run?

No response

What does your .oxlint.json config file look like?

proposed example:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "ignores": [
      "packages/*",
      ".nx/",
      "dist/"
  ],
  "plugins": ["import", "unicorn"],
  "rules": {
    "oxc/no-barrel-file": "warn"
  }

What happened?

When I use eslint flat config with eslint 9, eslint spam me warning about not use .eslintignore which is only way to ignore files and folders supported by oxlint.

I suggest to support "ignores" in config from eslint flat config which way to set paths for ignoring. Link to ignores in eslint website: https://eslint.org/docs/latest/use/configure/ignore

After it implemented people from eslint 9 can use oxlint without annoying warnings.

DonIsaac commented 3 weeks ago

Is an .eslintignore not sufficient?

pumano commented 3 weeks ago

Is an .eslintignore not sufficient?

It's deprecated in eslint 9, and it's warn every time I run eslint, also I use nx, which all jobs internally rely on eslint and warn every job run (build, test, lint, etc)