Clear vue-cli spaces error

Here you can see the error prompted "found 12 errors, 12 errors at The Potentially fixable with --fixthe Option", the next check is error Eslint thrown, before we vue combat development 003: When vue-cli 3.0 Detailed project built select the code that will be checked after the standard (normal mode) so each time you start the project, meets Eslint specification.

vue combat development 005: Solving the Vue-cli3 error in Eslint
2
and Eslint syntax specification is quite strict, is a space-digit error will not, so considerable trouble. Open .editorconfig profile we can see Eslint indentation is 2, and the default indentation is vscode 4 (Eslint code formatter and code specifications inconsistent).

vue combat development 005: Solving the Vue-cli3 error in Eslint
3
we will vscode indent change overnight, into Eslint grammar indent program, use the shortcut keys shift + alt + f reformatted under the code, and then restart service, system or error.

vue combat development 005: Solving the Vue-cli3 error in Eslint
4
Ba Eslint indentation into 4 equally wrong, I re-checked the code, some simple questions modified a bit, the error is resolved, the new code again when we should note, writing the code must meet the specifications Eslint grammar, syntax Eslint spaces are not allowed even wrong.

vue combat development 005: Solving the Vue-cli3 in Eslint error
5
if you do not like the syntax specification Eslint can turn it off, you close behind me, and too much trouble because of some error messages are often caused by problems indent, really want to use less Eslint, after the creation of the project in order to find some time or had simply ignore code detection (self-examination), syntax checking as long as you want to close Eslint .eslintrc.js found in the file '@ vue / standard' configuration to deleted.

vue combat development 005: Solving the Vue-cli3 error in Eslint
6
summarizes: ESLint is a grammar rules and code style checking tool to ensure write grammatically correct, uniform-style code, the more suitable for team development and code already large use hundreds of times God personally feel syntax specification Eslint more stringent, as we can difficult novice to adapt to it such high demand, of course, if you can adapt from the start ESLint specification knock code, I believe your future will surely become a great God the (I can not do that).

https://jingyan.baidu.com/article/ab0b563046106bc15afa7de2.htmlHere Insert Picture Description

Published 13 original articles · won praise 0 · Views 292

Guess you like

Origin blog.csdn.net/q314050231/article/details/104693794