Skip to content

Commit

Permalink
feat: 增加eslint配置
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwmg committed Dec 27, 2019
1 parent fd94f85 commit e8bd327
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
root:true,//
env: {
browser: true,
es6: true,
},
extends: [
'plugin:vue/base',
'standard',//由于团队实现eslint规范初期可能需要修改的地方比较多
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018,
parser:'babel-eslint'
},
rules: {
'vue/comment-directive': 'off',
'vue/jsx-uses-vars': 'off',
'semi':[2,'always']
}
}
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/config-angular": "^8.2.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.0.2",
"husky": "^3.1.0",
"istanbul": "^0.4.5",
"lerna": "^3.5.1"
"lerna": "^3.5.1",
"lint-staged": "^9.5.0"
},
"husky": {
"hooks": {
"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"dependencies": {
Expand All @@ -31,5 +41,8 @@
"mocha": "*",
"nyc": "*",
"rimraf": "^2.6.3"
},
"lint-staged": {
"packages/**/*.js": "eslint"
}
}
}

0 comments on commit e8bd327

Please sign in to comment.