lint gulpfile, add eslint config and ignore file for those that using eslint
This commit is contained in:
parent
4296b41faf
commit
fa5afe879e
3 changed files with 135 additions and 95 deletions
39
.eslintrc.js
Normal file
39
.eslintrc.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
module.exports = {
|
||||
"root": true,
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint",
|
||||
"ecmaVersion": 2017,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true
|
||||
},
|
||||
"globals": {
|
||||
"window": true,
|
||||
"location": true
|
||||
},
|
||||
"extends": [
|
||||
"airbnb-base",
|
||||
],
|
||||
// custom rules here
|
||||
"rules": {
|
||||
// don"t require .vue extension when importing
|
||||
"import/extensions": ["error", "always", {
|
||||
"js": "never",
|
||||
"vue": "js",
|
||||
"mjs": "never"
|
||||
}],
|
||||
"no-param-reassign": ["error", {
|
||||
"props": true,
|
||||
"ignorePropertyModificationsFor": [
|
||||
"event", // for e.returnvalue
|
||||
"response", // for Express responses
|
||||
"item", // for item usually within each loops
|
||||
]
|
||||
}],
|
||||
// allow debugger during development
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue