eslint 是一个应用广泛的javascript代码检查工具。
能检测变量名重复等等...
1.安装
npm install -g eslint
2.初始化
会在当前目录下生成一个.eslintrc.js 配置文件
eslint --init
3.检查某个js文件
eslint yourfile.js