-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
91 lines (88 loc) · 2.19 KB
/
.eslintrc.json
File metadata and controls
91 lines (88 loc) · 2.19 KB
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
{
"root": true,
"env": {
"node": true,
"es2022": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:vue/vue3-recommended",
"prettier"
],
"plugins": [
"@typescript-eslint",
"vue"
],
"rules": {
/* TypeScript Strict Rules - Constitution Principle I */
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-non-null-assertion": "warn",
/* Code Quality - Constitution Principle IV */
"max-lines": [
"warn",
{
"max": 300,
"skipBlankLines": true,
"skipComments": true
}
],
"max-lines-per-function": [
"warn",
{
"max": 50,
"skipBlankLines": true,
"skipComments": true
}
],
"complexity": ["warn", 10],
"max-depth": ["warn", 3],
"max-params": ["warn", 4],
/* General Best Practices */
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-debugger": "error",
"no-alert": "error",
"eqeqeq": ["error", "always"],
"curly": ["error", "all"],
"prefer-const": "error",
"no-var": "error",
/* Vue 3 Specific */
"vue/multi-word-component-names": "warn",
"vue/component-name-in-template-casing": ["error", "PascalCase"],
"vue/require-default-prop": "error",
"vue/require-prop-types": "error"
},
"overrides": [
{
"files": ["*.vue"],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
}
},
{
"files": ["*.spec.ts", "*.test.ts"],
"rules": {
"max-lines-per-function": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}