0.0.6 • Published 5 years ago
eslint-config-yyued v0.0.6
YY.UED ESLint 配置标准
风格
编辑器中使用
VSCode
1. 全局安装
$ yarn global add eslint-config-yyued
2. 编辑器安装 ESLint 插件
在 VSCode 插件面板中,搜索 ESLint 进行安装
3. 编辑器 ESLint 插件配置
"eslint.nodePath": "${这里填你找到的安装依赖的 node_modules 地址}",
"eslint.autoFixOnSave": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
4. 项目配置 ESLint 配置文件 .eslintrc.js
JS 项目
module.exports = {
extends: [
'yyued'
]
}
TS 项目
module.exports = {
extends: [
'yyued/ts'
]
}
Vue.js 项目
module.exports = {
extends: [
'yyued/vue'
]
}
Vue.ts 项目
module.exports = {
extends: [
'yyued/vue-ts'
]
}