一个高手写的自定义规则(我觉得蛮受众的):
https://github.com/AlloyTeam/eslint-config-alloy/blob/master/index.js
每个人和团队都有自己的代码规范,可以写一份属于自己的eslint 规则。
问题: 如何用eslint的规则去格式化?
解决:
- 需要webstorm2017.3以上
1、webstorm File -> Settings ->Editor->Code Style
indent建议为off,因为还是习惯script首行缩进,假如硬要一样不缩进可以设置以下项
2、右键应用.eslintrc.js