@tsofist/web-buddy 1.13.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/eslint/shared.yaml +2 -0
- package/eslint/stricter.extends.yaml +10 -0
- package/eslint/typescript/common.yaml +1 -1
- package/eslint/typescript/rules.yaml +79 -1
- package/eslint/typescript/stricter.rules.yaml +4 -0
- package/eslint/vue/common.yaml +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,9 @@ All specified configurations are easily extensible, so simply use the configurat
|
|
|
32
32
|
},
|
|
33
33
|
"eslintConfig": {
|
|
34
34
|
"root": true,
|
|
35
|
-
"extends":
|
|
35
|
+
"extends": [
|
|
36
|
+
"./node_modules/@tsofist/web-buddy/.eslintrc.yaml"
|
|
37
|
+
]
|
|
36
38
|
},
|
|
37
39
|
"release": {
|
|
38
40
|
"extends": [
|
|
@@ -41,3 +43,16 @@ All specified configurations are easily extensible, so simply use the configurat
|
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
```
|
|
46
|
+
|
|
47
|
+
Or for extra strictness:
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"eslintConfig": {
|
|
51
|
+
"root": true,
|
|
52
|
+
"extends": [
|
|
53
|
+
"./node_modules/@tsofist/web-buddy/.eslintrc.yaml",
|
|
54
|
+
"./node_modules/@tsofist/web-buddy/eslint/stricter.extends.yaml"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
package/eslint/shared.yaml
CHANGED
|
@@ -3,6 +3,8 @@ rules:
|
|
|
3
3
|
'@typescript-eslint/explicit-member-accessibility':
|
|
4
4
|
- error
|
|
5
5
|
- accessibility: no-public
|
|
6
|
+
|
|
7
|
+
# todo https://typescript-eslint.io/rules/ban-types/
|
|
6
8
|
'@typescript-eslint/ban-types':
|
|
7
9
|
- warn
|
|
8
10
|
- extendDefaults: true
|
|
@@ -12,6 +14,23 @@ rules:
|
|
|
12
14
|
suggest:
|
|
13
15
|
- PRec
|
|
14
16
|
- Rec
|
|
17
|
+
|
|
18
|
+
# '@typescript-eslint/no-restricted-types':
|
|
19
|
+
# - warn
|
|
20
|
+
# - types:
|
|
21
|
+
# Record:
|
|
22
|
+
# message: 'Avoid using the Record type as it may pose some risks. Instead, consider using the @tsofist/stem: PRec/Rec type (Your Stem. With LOVE).'
|
|
23
|
+
# suggest:
|
|
24
|
+
# - PRec
|
|
25
|
+
# - Rec
|
|
26
|
+
|
|
27
|
+
'@typescript-eslint/ban-ts-comment':
|
|
28
|
+
- error
|
|
29
|
+
- minimumDescriptionLength: 7
|
|
30
|
+
ts-expect-error: allow-with-description
|
|
31
|
+
ts-nocheck: allow-with-description
|
|
32
|
+
ts-ignore: true
|
|
33
|
+
ts-check: false
|
|
15
34
|
'@typescript-eslint/explicit-module-boundary-types': off
|
|
16
35
|
'@typescript-eslint/no-explicit-any': off
|
|
17
36
|
'@typescript-eslint/no-non-null-assertion': off
|
|
@@ -49,7 +68,7 @@ rules:
|
|
|
49
68
|
|
|
50
69
|
'@typescript-eslint/method-signature-style':
|
|
51
70
|
- error
|
|
52
|
-
-
|
|
71
|
+
- property
|
|
53
72
|
|
|
54
73
|
lines-between-class-members: off
|
|
55
74
|
'@typescript-eslint/lines-between-class-members':
|
|
@@ -76,3 +95,62 @@ rules:
|
|
|
76
95
|
|
|
77
96
|
func-call-spacing: off
|
|
78
97
|
'@typescript-eslint/func-call-spacing': error
|
|
98
|
+
|
|
99
|
+
'@typescript-eslint/unbound-method':
|
|
100
|
+
- error
|
|
101
|
+
- ignoreStatic: true
|
|
102
|
+
|
|
103
|
+
'@typescript-eslint/no-invalid-void-type':
|
|
104
|
+
- error
|
|
105
|
+
- allowAsThisParameter: true
|
|
106
|
+
allowInGenericTypeArguments: true
|
|
107
|
+
|
|
108
|
+
'@typescript-eslint/no-confusing-void-expression':
|
|
109
|
+
- error
|
|
110
|
+
- ignoreArrowShorthand: true
|
|
111
|
+
ignoreVoidOperator: true
|
|
112
|
+
|
|
113
|
+
'@typescript-eslint/restrict-plus-operands':
|
|
114
|
+
- error
|
|
115
|
+
- allowAny: false
|
|
116
|
+
allowBoolean: false
|
|
117
|
+
allowNullish: false
|
|
118
|
+
allowNumberAndString: false
|
|
119
|
+
allowRegExp: false
|
|
120
|
+
|
|
121
|
+
'@typescript-eslint/restrict-template-expressions':
|
|
122
|
+
- error
|
|
123
|
+
- allowAny: false
|
|
124
|
+
allowNullish: false
|
|
125
|
+
allowRegExp: false
|
|
126
|
+
allowNumber: true
|
|
127
|
+
allowBoolean: true
|
|
128
|
+
allowNever: true
|
|
129
|
+
|
|
130
|
+
'@typescript-eslint/no-wrapper-object-types': error
|
|
131
|
+
|
|
132
|
+
# It doesn’t work properly in some cases
|
|
133
|
+
'@typescript-eslint/unified-signatures': off
|
|
134
|
+
|
|
135
|
+
# It doesn’t work properly in some cases
|
|
136
|
+
'@typescript-eslint/no-unsafe-enum-comparison': off
|
|
137
|
+
|
|
138
|
+
# It breaks the annotation logic
|
|
139
|
+
'@typescript-eslint/no-duplicate-type-constituents': off
|
|
140
|
+
|
|
141
|
+
# It's fine in general
|
|
142
|
+
'@typescript-eslint/no-dynamic-delete': off
|
|
143
|
+
|
|
144
|
+
# It’s covered by the compilerOptions.strict setting
|
|
145
|
+
'@typescript-eslint/no-unsafe-assignment': off
|
|
146
|
+
|
|
147
|
+
'@typescript-eslint/no-extraneous-class':
|
|
148
|
+
- error
|
|
149
|
+
- allowWithDecorator: true
|
|
150
|
+
allowStaticOnly: true
|
|
151
|
+
|
|
152
|
+
# "stricter" rules -->
|
|
153
|
+
'@typescript-eslint/no-unsafe-argument': off
|
|
154
|
+
'@typescript-eslint/no-unsafe-member-access': off
|
|
155
|
+
'@typescript-eslint/no-unsafe-return': off
|
|
156
|
+
# <--
|
package/eslint/vue/common.yaml
CHANGED
package/package.json
CHANGED