ESLint

 

1.中文查询

提示查询,可把网址中的org改成cn,则可实现中英文切换

 

2.使某个文件的不使用eslint检验

在文件第一行添加

/* eslint-disable */

 

3.使用eslint格式化项目

package.json 内的scripts下的lint属性,添加 --fix

  "scripts": {
    "dev": "node build/dev-server.js",
    "start": "node build/dev-server.js",
    "build": "node build/build.js",
    "lint": "eslint --fix --ext .js,.vue src"
  },

再运行 npm run lint格式化项目

 

posted @ 2018-09-14 11:05  泠风lj  阅读(147)  评论(0)    收藏  举报