-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
128 lines (124 loc) · 2.95 KB
/
.eslintrc
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"env": {
"browser": true,
"es2022": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:jsdoc/recommended",
"plugin:prettier/recommended"
],
"plugins": ["import", "jsdoc", "jest"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
/* Code Quality */
"complexity": ["warn", 10],
"curly": ["error", "multi-line"],
"default-case": "error",
"dot-notation": "error",
"eqeqeq": ["error", "smart"],
"max-depth": ["warn", 4],
"max-lines-per-function": ["warn", 50],
"no-var": "error",
"prefer-const": "error",
"prefer-template": "error",
/* Best Practices */
"array-callback-return": "error",
"block-scoped-var": "error",
"consistent-return": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-console": "warn",
"no-else-return": "error",
"no-eval": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-lone-blocks": "error",
"no-magic-numbers": [
"warn",
{ "ignore": [0, 1], "ignoreArrayIndexes": true }
],
"no-multi-spaces": "error",
"no-new": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"radix": "error",
"require-await": "warn",
"vars-on-top": "error",
"yoda": "error",
/* Style */
"camelcase": ["error", { "properties": "always" }],
"new-cap": ["error", { "capIsNewExceptions": ["Signal"] }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"one-var": ["error", "never"],
/* Modules */
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always"
}
],
"import/no-cycle": "error",
"import/no-self-import": "error",
/* Documentation */
"jsdoc/require-param-description": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/check-param-names": "error",
"jsdoc/check-tag-names": "error",
"jsdoc/require-jsdoc": [
"warn",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}
]
},
"overrides": [
{
"files": ["test/**/*.js"],
"env": {
"jest/globals": true
},
"rules": {
"max-lines-per-function": "off",
"no-magic-numbers": "off",
"jsdoc/require-jsdoc": "off"
}
}
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js"]
}
},
"jsdoc": {
"mode": "typescript"
}
},
"globals": {
"Signal": "readonly",
"eleva": "readonly"
}
}