ESLint:在 WebStorm 中插入`⏎`(更漂亮/更漂亮)错误

时间:2020-12-30 13:19:59

标签: intellij-idea webstorm eslint

每次保存文件时 ESLint 都会出现此错误:

ESLint: Insert (prettier/prettier)

当我添加新行时,它删除它并仍然显示此错误。

如何防止 WebStorm 中出现此 ESLint 错误?

1 个答案:

答案 0 :(得分:1)

为了防止它在 intellij(Web Storm 等)上,设置编辑器配置以在所有文件的末尾添加新行。

你可以这样设置: Settings → Editor → General → Ensure line feed at file end on Save

更多细节:https://stackoverflow.com/a/16761228/134739