mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-10 12:50:38 +08:00
add eslint-plugin-vue
This commit is contained in:
parent
fded36c990
commit
3012ae38cb
28
.eslintrc.js
28
.eslintrc.js
@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: 'babel-eslint',
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint',
|
||||||
sourceType: 'module'
|
sourceType: 'module'
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
@ -9,22 +9,19 @@ module.exports = {
|
|||||||
node: true,
|
node: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
},
|
},
|
||||||
extends: 'eslint:recommended',
|
extends: ['plugin:vue/essential', 'eslint:recommended'],
|
||||||
// required to lint *.vue files
|
|
||||||
plugins: [
|
|
||||||
'html'
|
|
||||||
],
|
|
||||||
// check if imports actually resolve
|
|
||||||
'settings': {
|
|
||||||
'import/resolver': {
|
|
||||||
'webpack': {
|
|
||||||
'config': 'build/webpack.base.conf.js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// add your custom rules here
|
// add your custom rules here
|
||||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||||
'rules': {
|
rules: {
|
||||||
|
"vue/max-attributes-per-line": [2, {
|
||||||
|
"singleline": 10,
|
||||||
|
"multiline": {
|
||||||
|
"max": 1,
|
||||||
|
"allowFirstLine": false
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"vue/name-property-casing": ["error", "PascalCase"],
|
||||||
'accessor-pairs': 2,
|
'accessor-pairs': 2,
|
||||||
'arrow-spacing': [2, {
|
'arrow-spacing': [2, {
|
||||||
'before': true,
|
'before': true,
|
||||||
@ -196,4 +193,3 @@ module.exports = {
|
|||||||
'array-bracket-spacing': [2, 'never']
|
'array-bracket-spacing': [2, 'never']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
"eslint": "4.19.1",
|
"eslint": "4.19.1",
|
||||||
"eslint-friendly-formatter": "4.0.1",
|
"eslint-friendly-formatter": "4.0.1",
|
||||||
"eslint-loader": "2.0.0",
|
"eslint-loader": "2.0.0",
|
||||||
"eslint-plugin-html": "4.0.5",
|
"eslint-plugin-vue": "^4.7.1",
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"friendly-errors-webpack-plugin": "1.7.0",
|
"friendly-errors-webpack-plugin": "1.7.0",
|
||||||
"hash-sum": "^1.0.2",
|
"hash-sum": "^1.0.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user