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

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!


Solution 1:

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:

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:

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")