Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linter: add support "files" in config #7096

Open
Tracked by #4146
pumano opened this issue Nov 3, 2024 · 3 comments
Open
Tracked by #4146

linter: add support "files" in config #7096

pumano opened this issue Nov 3, 2024 · 3 comments
Assignees
Labels
A-linter Area - Linter C-bug Category - Bug

Comments

@pumano
Copy link
Contributor

pumano commented Nov 3, 2024

What version of Oxlint are you using?

0.11.0

What command did you run?

No response

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

Proposed config:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["import", "unicorn"],
  "files": ["**/*.ts", "**/*.tsx"],
  "rules": {
    "import/no-commonjs": "error",
    "import/no-cycle": "error",
    "import/no-duplicates": "error",
    "import/no-self-import": "error"
  }
}

What happened?

"files" should be supported, because it target some rules for specific file types. In my case i use import/no-commonjs rule against only *.ts files and skip *.js files

@pumano pumano added A-linter Area - Linter C-bug Category - Bug labels Nov 3, 2024
@pumano
Copy link
Contributor Author

pumano commented Nov 4, 2024

looks like "files" covered somehow only in upcoming "overrides" section: #6974
but not in root too.

@DonIsaac
Copy link
Collaborator

DonIsaac commented Nov 4, 2024

Should be trivial to add once overrides PR is in.

Apologies, that one is blocked by me- I still need to perform more intense testing

@DonIsaac DonIsaac self-assigned this Nov 4, 2024
@pumano
Copy link
Contributor Author

pumano commented Nov 13, 2024

@camchenry could you take a look? If "files" exist in overrides, looks like it's possible to add it to root?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

2 participants