add eslint
parent
9105c44966
commit
19f045ca8a
16
.eslintrc.js
16
.eslintrc.js
|
@ -7,21 +7,21 @@ module.exports = {
|
|||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
es6: true
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// 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: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
'vue/max-attributes-per-line': [2, {
|
||||
'singleline': 10,
|
||||
'multiline': {
|
||||
'max': 1,
|
||||
'allowFirstLine': false
|
||||
}
|
||||
}],
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
'vue/name-property-casing': ['error', 'PascalCase'],
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
"plugins": {
|
||||
'plugins': {
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
"autoprefixer": {}
|
||||
'autoprefixer': {}
|
||||
}
|
||||
}
|
||||
|
|
10
package.json
10
package.json
|
@ -5,11 +5,10 @@
|
|||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve --mode development",
|
||||
"start": "npm run dev",
|
||||
"build": "node build/build.js",
|
||||
"build:report": "npm_config_report=true npm run build",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build:report": "vue-cli-service build --report",
|
||||
"lint": "vue-cli-service lint --ext .js,.vue src",
|
||||
"test": "npm run lint",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||
},
|
||||
|
@ -25,6 +24,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "3.0.3",
|
||||
"@vue/cli-plugin-eslint": "3.0.3",
|
||||
"@vue/cli-service": "3.0.3",
|
||||
"node-sass": "^4.9.3",
|
||||
"sass-loader": "7.1.0",
|
||||
|
|
Loading…
Reference in New Issue