Error reporting of console.log in eslint
Due to the standardization of eslint, the use of console.log will also report errors. The following settings allow console.log console output
Description: open the package.json file, find the rules attribute, and add the following code
//The rule attribute is available by default. If not, add it to the eslintconfig attribute
“rules”: {
// this line of code allows console.log to set
“no console”: “off”
}
Similar Posts:
- How to Solve error: Unexpected console statement (no-console)
- [Solved] Vue3+ts+eslint Error: warning Unexpected any. Specify a different type, warning Delete `·` , Missing return type on function, Require statement not part of import statement
- No undef check error in eslint
- [Solved] ESLint: ‘React’ was used before it was defined.(no-use-before-define)
- How to Solve Eslint syntax error in Vue project
- [Solved] ESLint Error: Line 10 exceeds the maximum line length of 100
- [Solved] Expected linebreaks to be ‘LF’ but found ‘CRLF’.
- [vue/no-parsing-error] Parsing error: invalid-first-character-of-tag-name.eslint-plugin-vue Parsing error: invalid-first-character-of-tag-name.eslint(vue/no-parsing-error)
- [Solved] Syntax Error: TypeError: eslint.CLIEngine is not a constructor
- Solution to the error of eslint “extra semicolon”