-
Notifications
You must be signed in to change notification settings - Fork 44
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
No documentation how to override rules #193
Comments
I was trying to figure out how to do this too. These docs seemed relevant: https://eslint.org/docs/latest/user-guide/configuring/rules#rules-from-plugins For my specific problem though (disabling
When adding ESLint rules, none of the following worked for me to remove warning from VSCode, neither when adding to the top-level ESLint config or svelte processor rules: {
'svelte3(security-anchor-rel-noreferrer)': 'off',
'svelte/security-anchor-rel-noreferrer': 'off',
'svelte3/security-anchor-rel-noreferrer': 'off',
'security-anchor-rel-noreferrer': 'off',
'svelte(security-anchor-rel-noreferrer)': 'off',
'svelte3/svelte3/svelte3(security-anchor-rel-noreferrer)': 'off',
'svelte3/svelte3/security-anchor-rel-noreferrer': 'off'
} However, configuring the Svelte extension like this removed the warnings:
More configuration (outside of ESLint) is possible, I used these links as references:
Particularly, that first reference mentions that you can remove ESLint warnings like this in your ESLint config. I haven't tested this yet:
|
I was trying to get rid of missing-declarations rule and It's somewhat buggy in VS Code though. Whenever I introduce new code that violates the rule, there will be a warning until it's restarted. |
For example missing-declaration is warn and I think it should be error, because if something is not defined, lint step should fail with error. But if I try to add
"missing-declaration": "error"
or"svelte3/missing-declaration": "error"
to my.eslintrc.json
rules, I will get errorDefinition for rule 'missing-declaration' was not found
I think that it should be documented how to override linter rules and possibly even have some list of rules that we can use.
The text was updated successfully, but these errors were encountered: