ESLint 自动修复忽略规则
ESLint autofix ignore rule
我在 vscode 中使用带有选项 "eslint.autoFixOnSave": true
的 ESLint。
基本上,我想要:
- 忽略 1 个特定规则修复:prefer-const
- 查看编辑器中突出显示的所有警告和错误(包括
prefer-const
)
好像有新插件:eslint-plugin-no-autofix
{
"plugins": ["no-autofix"],
"rules": {
"prefer-const": "off",
"no-autofix/prefer-const": "warn",
}
}
我在 vscode 中使用带有选项 "eslint.autoFixOnSave": true
的 ESLint。
基本上,我想要:
- 忽略 1 个特定规则修复:prefer-const
- 查看编辑器中突出显示的所有警告和错误(包括
prefer-const
)
好像有新插件:eslint-plugin-no-autofix
{
"plugins": ["no-autofix"],
"rules": {
"prefer-const": "off",
"no-autofix/prefer-const": "warn",
}
}