eslint-config-yyl-vue
v1.0.1
Published
eslint plugins for yyl vue project
Downloads
32
Readme
eslint-config-yyl-vue
为 yyl-vue 项目提供 eslint 文件
install
yarn add eslint-config-yyl-vue prettier eslint -D
usage
修改 package.json
文件
{
"eslintConfig": {
"extends": ["yyl-vue"]
},
"eslintIgnore": [
"node_modules",
"/build"
"/dist",
"/test",
"**/js/lib"
],
"prettier": {
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"arrowParens": "always",
"quoteProps": "consistent"
},
"scripts": {
"eslint": "eslint --ext=vue,js,ts ./",
"eslint:fix": "eslint --ext=vue,js,ts ./",
"prettier": "prettier --write ./**/*.{vue,js,ts}"
}
}
为了和 prettier 不冲突,请按照
package.json
的prettier
属性进行配置
自定义 prettier
可以通过定义 prettier/prettier
rules 来修改
{
"eslintConfig": {
"rules": {
"prettier/prettier": ["error", {
"semi": true
}]
}
},
"prettier": {
"semi": true
}
}
定义 .prettierignore
node_modules/
dist/