eslint-plugin-sonarjs icon indicating copy to clipboard operation
eslint-plugin-sonarjs copied to clipboard

is there way to set the severity for all rules to warn instead of error?

Open Ganesh1991 opened this issue 3 years ago • 5 comments

We are trying to integrate eslint-plugin-sonarjs into one of our existing projects. Currently, it is blocking the build and the CI/CD process due to errors. We are working on resolving the same but we can't solve it at once. is there any option to set the severity for all rules to warn?

eslint-plugin-sonarjs version: 0.9.1
eslint version: 5.14.1

Ganesh1991 avatar Aug 13 '21 10:08 Ganesh1991

https://eslint.org/docs/2.13.1/user-guide/configuring#configuring-rules

Yes, you can specify project specific configuration and change any rule you need

Anuovec avatar Aug 13 '21 17:08 Anuovec

This doesn't seem to work for "foo-plugin/recommended" : "warn" does it? I'd like a quick on/off switch for a whole rule set when it comes to local dev environment, but seems like the docs here only indicate override working on a rule by rule basis within the path. Any thoughts without manually rewriting/replacing the reference files?

thekidnamedkd avatar Aug 19 '21 01:08 thekidnamedkd

relates to https://github.com/SonarSource/eslint-plugin-sonarjs/issues/166

vilchik-elena avatar Aug 19 '21 06:08 vilchik-elena

found this https://github.com/bfanger/eslint-plugin-only-warn, may be it's something you need

vilchik-elena avatar Aug 19 '21 07:08 vilchik-elena

That is currently impossible.

Maybe putting /* eslint-disable */ at the top of the file would help. Or putting the whole codebase in eslint ignore.

Anuovec avatar Aug 19 '21 19:08 Anuovec

This issue has been migrated to Jira. ESLINTJS-14

Wohops avatar Apr 29 '24 08:04 Wohops