Front-end Daniel, in the process of developing vue, how to treat the blank error report, and how to solve it?

Front-end bulls, in the process of developing vue, how to treat the blank error report, and how to solve it?

May.08,2021

does the space error refer to?


what I do is turn off eslint configured by webpack .
use vscode + your own style eslint rules.
for example, extra spaces will show red errors, or warnings and so on.
ctrl+s automatically force corrections according to the configured eslint rules ( Note, do not use default automatic formatting ), such as removing extra spaces, changing double quotation marks into single quotation marks, object spaces before and after, and so on.

even if you don't want to close eslint, in webpack, you can create .eslintrc.js rules in the project root directory and use the vscdeo eslint extension to verify before packaging. Console errors are rarely reported.


The specification of

eslint can be turned off. For example, if you don't want to write a semicolon on every line, you can remove the corresponding rules in the .eslintrc file

.
{
  "parser": "babel-eslint",
  "env":{
    "browser": true,
    "es6":true,
    "node": true
  },
  "parserOptions":{
    "ecmaVersion": "6",
    "sourceType": "module"
  },
  "extends":"airbnb",
  "rules":{
    "semi":[0],    //
    "react/jsx-filename-extension":[0]
  }
}

just set the corresponding rule to 0

Menu