Is it possible to show warnings instead of errors on ALL of eslint rules?

ReactjsReact NativeEslintEslintrcStandardjs

Reactjs Problem Overview


As the title says, would it be possible for eslint to show warnings instead of errors on ALL of the rules? I'm using Standard JS, if that information is relevant.

Thanks!

Reactjs Solutions


Solution 1 - Reactjs

I think there's no out-of-the-box option right now, but maybe you could use a plugin to achieve that: Eslint plugin only warn

Or set all the rules as warning instead of errors.

Solution 2 - Reactjs

Following es-lint-plugin-prettier readme, edit your .eslintrc.json and put a specific rule for prettier:

"rules": {
  // maybe your other rules...

  "prettier/prettier": "warn"
}

Then, prettier rules will be issued as warnings instead of errors.

Not sure of all the side effects, but it seems to work ok for my project, where I also use @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-config-prettier and eslint-plugin-prettier.

If it helps, my extends config in .eslintrc.json:

"extends": [
  "eslint:recommended",
  "plugin:@typescript-eslint/eslint-recommended",
  "plugin:@typescript-eslint/recommended",
  "prettier/@typescript-eslint",
  "plugin:prettier/recommended"
],

Solution 3 - Reactjs

You can create an .eslintrc file with all the rules set to "warn"

If you already have an eslintrc file you can use that, or extend from a rules file such as the one here. In this one, all the rules are set to 0 (disabled). You can modify specific ones or all of them and set them to 1 (or "warn")

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionnrionView Question on Stackoverflow
Solution 1 - ReactjsWayrexView Answer on Stackoverflow
Solution 2 - ReactjsQortexView Answer on Stackoverflow
Solution 3 - ReactjsChetan Jadhav CDView Answer on Stackoverflow