StackOverflow上的答案 eslint的配置 安装 npm install eslint --save-dev -g 初始化规则 eslint --init 检测文件错误 eslint yourfile.js