0
votes

I follow this guide

https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a

to setup eslint with prettier in my project, but somehow the rules of no console doesn't work, eslint still throw warning when I use console.log, what's wrong here?

{
  "extends": ["airbnb", "prettier"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": ["error"],
    "no-console": 0
  }
}

I have eslint and prettier installed in my vscode

1
"no-console": "off" will disable the console warnings. eslint.org/docs/rules/no-console - dRoyson

1 Answers

0
votes

You must use

no-console: "error"

and within following to custom allows

no-console: ["error", { allow: ["warn", "error"] }]

reference: https://eslint.org/docs/rules/no-console