【发布时间】:2018-01-08 15:42:26
【问题描述】:
我在 vscode 中使用 ESLint 选项 "eslint.autoFixOnSave": true。
基本上,我想要:
- 忽略 1 个特定规则修复:prefer-const
- 查看编辑器中突出显示的所有警告和错误(包括
prefer-const)
【问题讨论】:
我在 vscode 中使用 ESLint 选项 "eslint.autoFixOnSave": true。
基本上,我想要:
prefer-const)【问题讨论】:
好像有一个新插件:eslint-plugin-no-autofix
{
"plugins": ["no-autofix"],
"rules": {
"prefer-const": "off",
"no-autofix/prefer-const": "warn",
}
}
【讨论】: