是否可以从
.editorconfig
在Intellij中启用eslint自动修复而不是手动配置?
手动配置Intellij:
我正在寻找这样的东西:
[*.{js,jsx,ts,tsx,json}]
ij_eslint_enable = true
ij_eslint_auto_fix_on_save = true
还有其他方法可以配置保存操作时运行吗?
通过Git分享找到了方法 .idea/jsLinters/eslint.xml 配置 eslint 模块行为的文件。
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EslintConfiguration">
<files-pattern value="**/*.{js,ts,jsx,tsx,cjs,cts,mjs,mts,html,json}" />
<option name="fix-on-save" value="true" />
</component>
</project>