@tsofist/web-buddy 1.13.1 → 1.14.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 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": "./node_modules/@tsofist/web-buddy/.eslintrc.yaml"
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
+ ```
@@ -37,6 +37,8 @@ rules:
37
37
  - name: lodash-es
38
38
  message: NEVER IMPORT lodash-es. Use ONLY lodash-es/<SOME-TOOL>
39
39
 
40
+ no-new-wrappers: error
41
+
40
42
  quotes:
41
43
  - error
42
44
  - single
@@ -0,0 +1,10 @@
1
+ overrides:
2
+ - files: ['*.ts', '*.tsx']
3
+ extends:
4
+ - ./typescript/common.yaml
5
+ - ./typescript/stricter.rules.yaml
6
+
7
+ - files: ['*.vue']
8
+ extends:
9
+ - ./vue/common.yaml
10
+ - ./typescript/stricter.rules.yaml
@@ -15,6 +15,6 @@ plugins:
15
15
  extends:
16
16
  - eslint:recommended
17
17
  - plugin:import/typescript
18
- - plugin:@typescript-eslint/eslint-recommended
18
+ - plugin:@typescript-eslint/strict-type-checked
19
19
  - ./rules.yaml
20
20
  - ../shared.yaml
@@ -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
- - method
71
+ - property
53
72
 
54
73
  lines-between-class-members: off
55
74
  '@typescript-eslint/lines-between-class-members':
@@ -76,3 +95,57 @@ 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
+ # "stricter" rules -->
148
+ '@typescript-eslint/no-unsafe-argument': off
149
+ '@typescript-eslint/no-unsafe-member-access': off
150
+ '@typescript-eslint/no-unsafe-return': off
151
+ # <--
@@ -0,0 +1,4 @@
1
+ rules:
2
+ '@typescript-eslint/no-unsafe-argument': error
3
+ '@typescript-eslint/no-unsafe-member-access': error
4
+ '@typescript-eslint/no-unsafe-return': error
@@ -23,6 +23,7 @@ extends:
23
23
  - plugin:import/typescript
24
24
  - '@vue/eslint-config-typescript/recommended'
25
25
  - plugin:vue/vue3-recommended
26
+ - plugin:@typescript-eslint/strict-type-checked
26
27
  - ../typescript/rules.yaml
27
28
  - ./rules.yaml
28
29
  - ../shared.yaml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsofist/web-buddy",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "Configuration basics for Linters, TypeScript, Semantic Release and others",
5
5
  "author": "Andrew Berdnikov <tsofistgudmen@gmail.com>",
6
6
  "license": "MIT",