添加自动eslint
山妖 2018-11-09 webpackvue-cli
1、添加standard
npm install standard --save-dev
2、添加执行命令
{
"name": "your-project-name",
"devDependencies": {
"standard": "*"
},
// 只要在scripts添加以下两句命令
"scripts": {
"vy": "standard && node my-tests.js",
"fix": "standard --fix"
}
}
3、执行命令
yarn run fix