-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
With 0.50, seeing errors from new eslint-plugin-n that can't be suppressed #670
Comments
I was able to repro. I've put a xo config in package.json to turn off the rule: "xo": {
"rules": {
"n/no-unsupported-features/es-syntax": 0
}
} However, it does not work. I ran "n/no-unsupported-features/es-syntax": [
"error",
{
"version": ">=12",
"ignores": [
"modules"
]
}
], |
BTW when I downgrade to xo 0.49, it complains "Definition for rule n/no-unsupported-features/es-syntax was not found." |
Duplicate of #613 |
atm, users cannot disable the rules, as the defaults was always applied. fixes xojs#670
Closing as duplicate |
xo 0.50 changed from eslint-plugin-node to eslint-plugin-n ('n'). I have some TypeScript code using optional chaining and nullish coalascing operators. eslint-plugin-n objects that as my node version is set to less than 14, I should not be using this syntax. However TypeScript transpiles these operators, as it knows what node version I am targeting. The 'n' documentation says "If you are using transpilers, maybe you want to ignore the warnings about some features. You can use this ignores option to ignore the given features."
I have in my .xo-config.json:
"n/no-unsupported-features/es-syntax": ["error", { "ignores": [ "optionalChaining", "nullishCoalescingOperators" ] }]
The errors are not suppressed. I was encouraged to submit an issue to 'n'. However it doesn't seem to be a problem with the 'n' plugin. I browsed the plugin code and it looks correct. Also I had previously left an 's' off the end of one of the 'ignores' strings and that should have reported an error, but I didn't see it.
I suspect that xo is not forwarding this config to the plugin correctly. Perhaps it is to do with your opinionated defaults that you want to apply? Sorry I don't really know how xo works internally. Anyway I have reverted to xo 0.49 for now.
The text was updated successfully, but these errors were encountered: