Categories
React Answers

How to show warnings instead of errors on all ESLint rules with React?

Spread the love

To show warnings instead of errors on all ESLint rules with React, we set each rule to 'warm' in .eslintrc.

For instance, we write

{
  "rules": {
    //...
    "prettier/prettier": "warn"
  }
}

to set "prettier/prettier" to "warn' in "rules' to make ESLint return a warning instead of an error when the rule is violated.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

One reply on “How to show warnings instead of errors on all ESLint rules with React?”

Leave a Reply

Your email address will not be published. Required fields are marked *