-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
54 lines (54 loc) · 1.65 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
// 参考 https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "eslint:recommended"],
rules: {
"no-console": "off",
"no-debugger": "off",
"no-unused-vars": "off",
"no-useless-escape": "off",
// plugin:vue/recommended 规则
"vue/attributes-order": "error",
"vue/html-quotes": ["error", "double"],
// plugin:vue/strongly-recommended 规则
"vue/attribute-hyphenation": ["error", "always"],
"vue/html-end-tags": "error",
"vue/html-indent": "off",
"vue/require-default-prop": "error",
"vue/require-prop-types": "error",
"vue/jsx-uses-vars": "error",
"vue/order-in-components": [
"error",
{
// methods 顺序和 官网推荐稍有不同
order: [
"el",
"name",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives", "filters"],
"extends",
"mixins",
"inheritAttrs",
"model",
["props", "propsData"],
"data",
"computed",
"watch",
"methods",
"LIFECYCLE_HOOKS",
["template", "render"],
"renderError"
]
}
]
},
parserOptions: {
parser: "babel-eslint"
},
globals: {}
};