More Articles
This paper made with Vue demonstration projects.
To ESlint the election, after downloading the dependency, open the project with VSCode When you create a project using the Vue CLI.
Plug ESLint, then File -> Preference -> Settings (if installed Chinese plug-in package should be the File -> Options -> User),
search eslint, click Edit in setting.json
Add the following options to a profile
"eslint.autoFixOnSave": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
],
After configuring, VSCode will be based at your current Vue project .eslintrc.js
to verify and document formatting code rules.
PS: automatic formatting codes triggered automatically when you save the current test as well as the TS and JS files JS code vue no problem, html and
vue of the template is not valid.