eslint-config-typed 4.0.5 → 4.0.7
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/dist/plugins/react-coding-style/rules/display-name.d.mts +2 -2
- package/dist/plugins/react-coding-style/rules/display-name.d.mts.map +1 -1
- package/dist/plugins/react-coding-style/rules/display-name.mjs +110 -30
- package/dist/plugins/react-coding-style/rules/display-name.mjs.map +1 -1
- package/dist/plugins/react-coding-style/rules/rules.d.mts +2 -2
- package/dist/rules/eslint-react-coding-style-rules.d.mts +1 -3
- package/dist/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
- package/dist/rules/eslint-react-coding-style-rules.mjs +1 -1
- package/dist/rules/eslint-react-coding-style-rules.mjs.map +1 -1
- package/dist/rules/eslint-react-rules.d.mts +1 -1
- package/dist/rules/eslint-react-rules.mjs +1 -1
- package/dist/rules/eslint-react-rules.mjs.map +1 -1
- package/dist/types/rules/eslint-cypress-rules.d.mts +2 -2
- package/dist/types/rules/eslint-import-rules.d.mts +214 -168
- package/dist/types/rules/eslint-import-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-jest-rules.d.mts +47 -45
- package/dist/types/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-playwright-rules.d.mts +41 -34
- package/dist/types/rules/eslint-playwright-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts +6 -2
- package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-coding-style-rules.d.mts +21 -6
- package/dist/types/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-rules.d.mts +208 -185
- package/dist/types/rules/eslint-react-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-rules.d.mts +1244 -1073
- package/dist/types/rules/eslint-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-stylistic-rules.d.mts +707 -619
- package/dist/types/rules/eslint-stylistic-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-ts-restrictions-rules.d.mts +94 -76
- package/dist/types/rules/eslint-ts-restrictions-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-unicorn-rules.d.mts +145 -121
- package/dist/types/rules/eslint-unicorn-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-vitest-rules.d.mts +43 -42
- package/dist/types/rules/eslint-vitest-rules.d.mts.map +1 -1
- package/dist/types/rules/typescript-eslint-rules.d.mts +1973 -1763
- package/dist/types/rules/typescript-eslint-rules.d.mts.map +1 -1
- package/package.json +58 -57
- package/src/plugins/react-coding-style/README.md +4 -3
- package/src/plugins/react-coding-style/rules/display-name.mts +160 -38
- package/src/plugins/react-coding-style/rules/display-name.test.mts +70 -6
- package/src/plugins/react-coding-style/rules/shared.test.mts +148 -0
- package/src/plugins/vitest-coding-style/rules/original-assert-api-type.test.mts +147 -143
- package/src/rules/eslint-react-coding-style-rules.mts +1 -1
- package/src/rules/eslint-react-rules.mts +1 -1
- package/src/types/rules/eslint-cypress-rules.mts +2 -2
- package/src/types/rules/eslint-import-rules.mts +214 -168
- package/src/types/rules/eslint-jest-rules.mts +47 -45
- package/src/types/rules/eslint-playwright-rules.mts +41 -34
- package/src/types/rules/eslint-prefer-arrow-functions-rules.mts +6 -2
- package/src/types/rules/eslint-react-coding-style-rules.mts +21 -6
- package/src/types/rules/eslint-react-rules.mts +208 -185
- package/src/types/rules/eslint-rules.mts +1229 -1058
- package/src/types/rules/eslint-stylistic-rules.mts +707 -619
- package/src/types/rules/eslint-ts-restrictions-rules.mts +94 -76
- package/src/types/rules/eslint-unicorn-rules.mts +145 -121
- package/src/types/rules/eslint-vitest-rules.mts +43 -42
- package/src/types/rules/typescript-eslint-rules.mts +1973 -1763
|
@@ -2,146 +2,150 @@ import { expectType } from 'ts-data-forge';
|
|
|
2
2
|
// eslint-disable-next-line vitest/no-importing-vitest-globals
|
|
3
3
|
import { type assert as originalAssert } from 'vitest';
|
|
4
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
5
|
+
test('original assert exposes only supported APIs', () => {
|
|
6
|
+
expectType<
|
|
7
|
+
StrictExclude<
|
|
8
|
+
keyof typeof originalAssert,
|
|
9
|
+
| 'approximately'
|
|
10
|
+
| 'changes'
|
|
11
|
+
| 'changesBy'
|
|
12
|
+
| 'closeTo'
|
|
13
|
+
| 'containsAllDeepKeys'
|
|
14
|
+
| 'containsAllKeys'
|
|
15
|
+
| 'containsSubset'
|
|
16
|
+
| 'containSubset'
|
|
17
|
+
| 'decreases'
|
|
18
|
+
| 'decreasesButNotBy'
|
|
19
|
+
| 'decreasesBy'
|
|
20
|
+
| 'deepEqual' // remove
|
|
21
|
+
| 'deepInclude'
|
|
22
|
+
| 'deepNestedInclude'
|
|
23
|
+
| 'deepNestedPropertyVal'
|
|
24
|
+
| 'deepOwnInclude'
|
|
25
|
+
| 'deepProperty'
|
|
26
|
+
| 'deepPropertyVal'
|
|
27
|
+
| 'deepStrictEqual'
|
|
28
|
+
| 'doesNotChange'
|
|
29
|
+
| 'doesNotContainSubset'
|
|
30
|
+
| 'doesNotDecrease'
|
|
31
|
+
| 'doesNotDecreaseBy'
|
|
32
|
+
| 'doesNotHaveAllDeepKeys'
|
|
33
|
+
| 'doesNotHaveAllKeys'
|
|
34
|
+
| 'doesNotHaveAnyDeepKeys'
|
|
35
|
+
| 'doesNotHaveAnyKeys'
|
|
36
|
+
| 'doesNotIncrease'
|
|
37
|
+
| 'doesNotThrow'
|
|
38
|
+
| 'equal' // remove
|
|
39
|
+
| 'exists'
|
|
40
|
+
| 'extensible'
|
|
41
|
+
| 'fail'
|
|
42
|
+
| 'frozen'
|
|
43
|
+
| 'hasAllDeepKeys'
|
|
44
|
+
| 'hasAllKeys'
|
|
45
|
+
| 'hasAnyDeepKeys'
|
|
46
|
+
| 'hasAnyKeys'
|
|
47
|
+
| 'ifError'
|
|
48
|
+
| 'include'
|
|
49
|
+
| 'includeDeepMembers'
|
|
50
|
+
| 'includeDeepOrderedMembers'
|
|
51
|
+
| 'includeMembers'
|
|
52
|
+
| 'includeOrderedMembers'
|
|
53
|
+
| 'increases'
|
|
54
|
+
| 'increasesButNotBy'
|
|
55
|
+
| 'increasesBy'
|
|
56
|
+
| 'instanceOf'
|
|
57
|
+
| 'isAbove'
|
|
58
|
+
| 'isArray'
|
|
59
|
+
| 'isAtLeast'
|
|
60
|
+
| 'isAtMost'
|
|
61
|
+
| 'isBelow'
|
|
62
|
+
| 'isBoolean'
|
|
63
|
+
| 'isDefined'
|
|
64
|
+
| 'isEmpty'
|
|
65
|
+
| 'isExtensible'
|
|
66
|
+
| 'isFalse'
|
|
67
|
+
| 'isFinite'
|
|
68
|
+
| 'isFrozen'
|
|
69
|
+
| 'isFunction'
|
|
70
|
+
| 'isNaN'
|
|
71
|
+
| 'isNotArray'
|
|
72
|
+
| 'isNotBoolean'
|
|
73
|
+
| 'isNotEmpty'
|
|
74
|
+
| 'isNotExtensible'
|
|
75
|
+
| 'isNotFalse'
|
|
76
|
+
| 'isNotFrozen'
|
|
77
|
+
| 'isNotFunction'
|
|
78
|
+
| 'isNotNaN'
|
|
79
|
+
| 'isNotNull'
|
|
80
|
+
| 'isNotNumber'
|
|
81
|
+
| 'isNotObject'
|
|
82
|
+
| 'isNotOk' // remove
|
|
83
|
+
| 'isNotSealed'
|
|
84
|
+
| 'isNotString'
|
|
85
|
+
| 'isNotTrue'
|
|
86
|
+
| 'isNull'
|
|
87
|
+
| 'isNumber'
|
|
88
|
+
| 'isObject'
|
|
89
|
+
| 'isOk' // remove
|
|
90
|
+
| 'isSealed'
|
|
91
|
+
| 'isString'
|
|
92
|
+
| 'isTrue'
|
|
93
|
+
| 'isUndefined'
|
|
94
|
+
| 'lengthOf'
|
|
95
|
+
| 'match'
|
|
96
|
+
| 'nestedInclude'
|
|
97
|
+
| 'nestedProperty'
|
|
98
|
+
| 'nestedPropertyVal'
|
|
99
|
+
| 'notDeepEqual'
|
|
100
|
+
| 'notDeepInclude'
|
|
101
|
+
| 'notDeepNestedInclude'
|
|
102
|
+
| 'notDeepNestedPropertyVal'
|
|
103
|
+
| 'notDeepOwnInclude'
|
|
104
|
+
| 'notDeepProperty'
|
|
105
|
+
| 'notDeepPropertyVal'
|
|
106
|
+
| 'notEqual' // remove
|
|
107
|
+
| 'notExists'
|
|
108
|
+
| 'notExtensible'
|
|
109
|
+
| 'notFrozen'
|
|
110
|
+
| 'notInclude'
|
|
111
|
+
| 'notIncludeDeepMembers'
|
|
112
|
+
| 'notIncludeDeepOrderedMembers'
|
|
113
|
+
| 'notIncludeMembers'
|
|
114
|
+
| 'notIncludeOrderedMembers'
|
|
115
|
+
| 'notInstanceOf'
|
|
116
|
+
| 'notMatch'
|
|
117
|
+
| 'notNestedInclude'
|
|
118
|
+
| 'notNestedProperty'
|
|
119
|
+
| 'notNestedPropertyVal'
|
|
120
|
+
| 'notOk' // remove
|
|
121
|
+
| 'notOwnInclude'
|
|
122
|
+
| 'notProperty'
|
|
123
|
+
| 'notPropertyVal'
|
|
124
|
+
| 'notSameDeepMembers'
|
|
125
|
+
| 'notSameDeepOrderedMembers'
|
|
126
|
+
| 'notSameOrderedMembers'
|
|
127
|
+
| 'notSealed'
|
|
128
|
+
| 'notStrictEqual'
|
|
129
|
+
| 'notTypeOf'
|
|
130
|
+
| 'ok' // remove
|
|
131
|
+
| 'oneOf'
|
|
132
|
+
| 'operator'
|
|
133
|
+
| 'ownInclude'
|
|
134
|
+
| 'property'
|
|
135
|
+
| 'propertyVal'
|
|
136
|
+
| 'sameDeepMembers'
|
|
137
|
+
| 'sameDeepOrderedMembers'
|
|
138
|
+
| 'sameMembers'
|
|
139
|
+
| 'sameOrderedMembers'
|
|
140
|
+
| 'sealed'
|
|
141
|
+
| 'strictEqual'
|
|
142
|
+
| 'throw'
|
|
143
|
+
| 'Throw'
|
|
144
|
+
| 'throws'
|
|
145
|
+
| 'typeOf'
|
|
146
|
+
>,
|
|
147
|
+
never
|
|
148
|
+
>('=');
|
|
149
|
+
|
|
150
|
+
assert.strictEqual(true, true);
|
|
151
|
+
});
|
|
@@ -11,5 +11,5 @@ export const eslintReactCodingStyleRules = {
|
|
|
11
11
|
'react-coding-style/react-memo-type-parameter': 'error',
|
|
12
12
|
'react-coding-style/ban-use-imperative-handle-hook': 'error',
|
|
13
13
|
'react-coding-style/use-memo-hook-style': 'error',
|
|
14
|
-
'react-coding-style/display-name': ['error', {
|
|
14
|
+
'react-coding-style/display-name': ['error', {}],
|
|
15
15
|
} as const satisfies EslintReactCodingStyleRules;
|
|
@@ -29,7 +29,7 @@ export const eslintReactRules = {
|
|
|
29
29
|
/** Enforce consistent usage of props destructuring. */
|
|
30
30
|
'react/destructuring-assignment': withDefaultOption('error'),
|
|
31
31
|
|
|
32
|
-
'react/display-name':
|
|
32
|
+
'react/display-name': 'off', // Covered by react-coding-style/display-name
|
|
33
33
|
'react/forbid-component-props': ['error', { forbid: ['className'] }],
|
|
34
34
|
'react/forbid-dom-props': withDefaultOption('error'),
|
|
35
35
|
'react/forbid-elements': withDefaultOption('error'),
|
|
@@ -214,7 +214,6 @@ namespace UnsafeToChainCommand {
|
|
|
214
214
|
* ```json
|
|
215
215
|
* [
|
|
216
216
|
* {
|
|
217
|
-
* "title": "rules",
|
|
218
217
|
* "description": "disallow actions within chains",
|
|
219
218
|
* "type": "object",
|
|
220
219
|
* "properties": {
|
|
@@ -223,7 +222,8 @@ namespace UnsafeToChainCommand {
|
|
|
223
222
|
* "description": "An additional list of methods to check for unsafe chaining.",
|
|
224
223
|
* "default": []
|
|
225
224
|
* }
|
|
226
|
-
* }
|
|
225
|
+
* },
|
|
226
|
+
* "title": "Options"
|
|
227
227
|
* }
|
|
228
228
|
* ]
|
|
229
229
|
* ```
|