-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
94 lines (92 loc) · 3.02 KB
/
.eslintrc.json
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"env": {
"browser": true,
"es2021": true
},
"globals": {
"defineEmits": "readonly",
"defineProps": "readonly"
},
"extends": ["eslint:recommended", "plugin:vue/vue3-recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["vue"],
"rules": {
"arrow-parens": ["error", "as-needed"],
"indent": ["warn", 4, {"SwitchCase": 1}],
"comma-dangle": ["warn", "always-multiline"],
"max-len": ["warn", {"code": 120}],
"max-lines": ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}],
"complexity": ["error", 5],
"max-depth": ["error", 4],
"max-statements-per-line": ["error", {"max": 2}],
"max-lines-per-function": ["warn", {"max": 30, "skipBlankLines": true, "skipComments": true}],
"object-curly-spacing": ["warn", "never"],
"array-bracket-spacing": ["warn", "never"],
"space-before-blocks": ["warn", "always"],
"arrow-spacing": ["warn", {"before": true, "after": true}],
"keyword-spacing": ["warn", {"before": true, "after": true}],
"quotes": ["warn", "single", {"avoidEscape": true}],
"no-console": "warn",
"no-unused-vars": ["error", {"argsIgnorePattern": "_"}],
/**
* Vue specific rules
*/
"vue/component-definition-name-casing": ["error", "PascalCase"],
"vue/html-indent": [
"error",
4,
{
"attribute": 1,
"baseIndent": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}
],
// Prettier handles this rule
"vue/max-attributes-per-line": [
"off"
// {
// "singleline": 6,
// "multiline": {
// "max": 1,
// "allowFirstLine": false
// }
// }
],
"vue/singleline-html-element-content-newline": "off",
"vue/attributes-order": [
"error",
{
// Not sure about the order here, will need to test more with this
"order": [
"DEFINITION",
"LIST_RENDERING",
"CONDITIONALS",
"RENDER_MODIFIERS",
"GLOBAL",
"UNIQUE",
"SLOT",
"TWO_WAY_BINDING",
"OTHER_DIRECTIVES",
"OTHER_ATTR",
"EVENTS",
"CONTENT"
],
"alphabetical": false
}
],
"vue/html-self-closing": [
"error",
{
// This is off, cause prettier can't handle it
"html": {"void": "always"}
}
],
"vue/no-mutating-props": "error",
"vue/multi-word-component-names": "off"
}
}