forked from longshao1027/vue-cnode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (66 loc) · 1.78 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
module.exports = {
root: true,
parser: "babel-eslint",
parserOptions: {
sourceType: "module"
},
extends: "airbnb-base",
// required to lint *.vue files
plugins: [
"html"
],
// check if imports actually resolve
settings: {
"import/resolver": {
"webpack": {
"config": "build/webpack.base.conf.js"
}
}
},
env: {
"browser": true,
"node": true
},
// add your custom rules here
rules: {
// don"t require .vue extension when importing
"import/extensions": ["error", "always", {
"js": "never",
"vue": "never"
}],
// allow debugger during development
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
"comma-dangle": ["error", {
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never",
}],
"padded-blocks": ["error", "never"],
// http://eslint.cn/docs/rules/no-param-reassign
"no-param-reassign": "off",
// http://eslint.cn/docs/rules/no-unused-expressions
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": false }],
// http://eslint.cn/docs/rules/no-mixed-operators
"no-mixed-operators": [
"error",
{
"groups": [
["+", "-", "*", "/", "%", "**"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": true
}
],
// http://eslint.cn/docs/rules/no-plusplus
"no-plusplus": "off",
// http://eslint.cn/docs/rules/new-cap
"new-cap": ["error", { "capIsNewExceptions": ["Message", "Snap"] }],
// http://eslint.cn/docs/rules/quote-props
"quote-props": "off"
}
}