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

Allow setting cli flags via .oxlintrc.json #5454

Closed
Raynos opened this issue Sep 4, 2024 · 5 comments · Fixed by #6120
Closed

Allow setting cli flags via .oxlintrc.json #5454

Raynos opened this issue Sep 4, 2024 · 5 comments · Fixed by #6120
Assignees
Labels
A-linter Area - Linter C-enhancement Category - New feature or request

Comments

@Raynos
Copy link

Raynos commented Sep 4, 2024

I want to set --deny correctness that I can set for the CLI but instead set that via the configuration file.

I see that I can tweak each rule one by one atomically, but I want to set the groups defaults, but without doing it in the CLI all the time.

@Raynos Raynos added the C-enhancement Category - New feature or request label Sep 4, 2024
@Raynos
Copy link
Author

Raynos commented Sep 4, 2024

I tried

{
  "settings": {},
  "rules": {
    "correctness": "deny"
  }
}

But that didnt work.

@DonIsaac DonIsaac added the A-linter Area - Linter label Sep 5, 2024
@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 5, 2024

We currently do not support this. I will work on it once the config refactor stack is merged.

@Raynos
Copy link
Author

Raynos commented Sep 5, 2024

For reference I'm currently running

oxlint -c=./.oxlintrc.json --tsconfig=./tsconfig.json . -D correctness -D perf -D suspicious --promise-plugin --import-plugin

Because I don't think i can set these flags in the oxlintrc.json

@Boshen Boshen added this to the Oxlint Beta Milestone milestone Sep 9, 2024
@xaviergonz
Copy link

how do you make those extra rules work in the VScode IDE via the oxc extension if they cannot be set via a config file?

DonIsaac added a commit that referenced this issue Sep 27, 2024
> closes #5454

Adds a `categories` property to config files, where each key is a `RuleCategory` and each value is `"allow"/"off"`, `"warn"`, or `"deny"/"error"`.

Note that this change won't come into effect until after #6088 is merged.
DonIsaac added a commit that referenced this issue Sep 27, 2024
> closes #5454

Adds a `categories` property to config files, where each key is a `RuleCategory` and each value is `"allow"/"off"`, `"warn"`, or `"deny"/"error"`.

Note that this change won't come into effect until after #6088 is merged.
@DonIsaac DonIsaac linked a pull request Sep 27, 2024 that will close this issue
DonIsaac added a commit that referenced this issue Oct 8, 2024
> closes #5454

Adds a `categories` property to config files, where each key is a `RuleCategory` and each value is `"allow"/"off"`, `"warn"`, or `"deny"/"error"`.

Note that this change won't come into effect until after #6088 is merged.
@DonIsaac
Copy link
Contributor

Completed. categories is now supported, and plugins will be available in the next release

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

Successfully merging a pull request may close this issue.

4 participants