我的eslint配置就像这样简单
{
"extends": "airbnb-base",
"env": {
"browser": true,
"es6": true,
"jquery": true
},
"plugins": [
"ejs"
]
}
Run Code Online (Sandbox Code Playgroud)
我跑的时候
eslint app.js
Run Code Online (Sandbox Code Playgroud)
输出是:
162:110 error A space is required after ',' comma-spacing
167:1 error Expected indentation of 2 spaces but found 4 indent
168:1 error Expected indentation of 4 spaces but found 8 indent
169:1 error Expected indentation of 4 spaces but found 8 indent
170:1 error Expected indentation of 2 spaces but found 4 indent
171:1 error Expected indentation of 4 spaces but found 8 indent
171:9 warning Unexpected console statement no-console
172:1 error Expected indentation of 4 spaces but found 8 indent
173:1 error Expected indentation of 6 spaces but found 12 indent
174:1 error Expected indentation of 6 spaces but found 12 indent
175:1 error Expected indentation of 4 spaces but found 8 indent
176:11 error Expected indentation of 2 spaces but found 4 indent
? 131 problems (116 errors, 15 warnings)
102 errors and 0 warnings potentially fixable with the `--fix` option.
Run Code Online (Sandbox Code Playgroud)
它说102个错误可修复--fix但是当我用eslint app.js --fix 它运行时没有修复任何东西.它显示相同的输出.为什么--fix无法解决任何问题?
当我从插件中删除ejs时,它工作正常.但是,仍然不明白这个问题的根本原因是什么.
| 归档时间: |
|
| 查看次数: |
1540 次 |
| 最近记录: |