0.0.3 • Published 6 years ago
@elfin-fe/eslint-plugin-elfin v0.0.3
elfin-convention
🧚♂️ The Convention of elfin bese on TSLint.
Motivation
- 🍪 能够顺利从
ESLint到TSLint过渡 - 🌹
TypeScript的类型约束能够提高代码可维护性以及用上DI - ☀️
TSLint借助TypeScript Compiler解析生成的AST更容易被解析 - 🎁将有更多的复杂风格约束被支持,并提供
Fixer
Convention
对代码进行 parse 遍历 AST,对相应不符合代码规范的进行相应的抛错❌,并提供 fixer。
vue-template
template
提供对 vue 的 template 代码片的检测,符合的代码规范有:
tabSize为 4 个空格缩进- 节点
属性的顺序要求
script
script 检测:
vuex来源,包括mapActions,mapGetters,mapState里的参数都需要加上vx前缀