-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
Using an ESLint config file does not seem to affect oxlint rule count #1969
Comments
This PR fixes the plugin parsing logic when reading a config file. Specifically, the plugin names defined in `RuleEnum`s use snake-case ("jsx_a11y") while in the config file they are written as "jsx-a11y". This inconsistency causes some rules to be filtered out. I tested the change with the config json file provided in #1969. - Before the change: `Finished in 21ms on 1 file with 157 rules using 8 threads.` - After the change: `Finished in 23ms on 1 file with 178 rules using 8 threads.` Related issue: #1969
Does v0.2.0 fixes this problem? |
I admittedly had troubles with 0.2.0 loading any rules from the config file. It seemed to ignore the config file completely and ran with what appeared to be the default rule config that ships with oxlint. Unfortunately, I didn't have enough time to look into it further and reverted back to 0.1.2. I can try again and look into it a bit more in detail maybe tomorrow or Monday. |
Can confirm that something is off with respecting config. For instance running oxc like this If I create a config: {
"rules": {
"no-console": "off"
}
} And run with Setting Setting the above rule to any of the allowed values still makes oxc to run validation against It seems like oxc doesn't respect the actual value for the rule in config. |
@jgeurts Do you mind pasting your config? I'm lacking examples to test on 😅 |
v0.2.1 made a correction for this issue. |
…oject#1972) This PR fixes the plugin parsing logic when reading a config file. Specifically, the plugin names defined in `RuleEnum`s use snake-case ("jsx_a11y") while in the config file they are written as "jsx-a11y". This inconsistency causes some rules to be filtered out. I tested the change with the config json file provided in oxc-project#1969. - Before the change: `Finished in 21ms on 1 file with 157 rules using 8 threads.` - After the change: `Finished in 23ms on 1 file with 178 rules using 8 threads.` Related issue: oxc-project#1969
Hi! I'm trying to use an eslint config file to explicitly enable/disable oxlint rules. However, each time I run oxlint, it shows that it is using 150 rules even though ~180 rules are enabled in the config file.
fwiw, I think this file can be reduced substantially after #1966 is supported.
oxlintrc.json
The text was updated successfully, but these errors were encountered: