eslint-plugin-class-validator-type-match 4.1.4 → 4.1.6
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/index.d.ts +77 -46
- package/dist/index.js +1 -1
- package/index.d.ts +28 -0
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,65 @@
|
|
|
1
|
-
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
meta: {
|
|
4
3
|
name: string;
|
|
5
4
|
version: string;
|
|
6
5
|
};
|
|
7
6
|
rules: {
|
|
8
|
-
'decorator-type-match':
|
|
7
|
+
'decorator-type-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"mismatch" | "enumMismatch" | "invalidEachOption", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
9
8
|
name: string;
|
|
10
9
|
};
|
|
11
|
-
'optional-decorator-match':
|
|
10
|
+
'optional-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"missingOptionalDecorator" | "missingOptionalSyntax" | "conflictingDefiniteAssignment" | "undefinedUnionWithoutDecorator" | "undefinedUnionWithoutOptional" | "nullUnionIncorrect" | "redundantUndefinedInType", [{
|
|
12
11
|
strictNullChecks?: boolean;
|
|
13
12
|
checkDefaultValues?: boolean;
|
|
14
13
|
customOptionalDecorators?: string[];
|
|
15
|
-
}], unknown,
|
|
14
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
16
15
|
name: string;
|
|
17
16
|
};
|
|
18
|
-
'validate-nested-match':
|
|
17
|
+
'validate-nested-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"nestedArrayMismatch" | "missingValidateNested" | "missingEachOption" | "unnecessaryValidateNested" | "tupleValidationWarning" | "multiTypeUnionWarning" | "mixedComplexityUnionWarning" | "pickOmitWarning", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
19
18
|
name: string;
|
|
20
19
|
};
|
|
21
|
-
'type-decorator-match':
|
|
20
|
+
'type-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"typeMismatch" | "missingTypeDecorator", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
22
21
|
name: string;
|
|
23
22
|
};
|
|
24
|
-
'definite-assignment-match':
|
|
23
|
+
'definite-assignment-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDefiniteAssignment", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
25
24
|
name: string;
|
|
26
25
|
};
|
|
27
|
-
'dto-filename-match':
|
|
26
|
+
'dto-filename-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDtoClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
28
27
|
name: string;
|
|
29
28
|
};
|
|
30
29
|
};
|
|
31
|
-
configs:
|
|
30
|
+
configs: {
|
|
31
|
+
recommended: {
|
|
32
|
+
plugins: string[];
|
|
33
|
+
rules: {
|
|
34
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
35
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
36
|
+
'class-validator-type-match/validate-nested-match': string;
|
|
37
|
+
'class-validator-type-match/type-decorator-match': string;
|
|
38
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
39
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
strict: {
|
|
43
|
+
plugins: string[];
|
|
44
|
+
rules: {
|
|
45
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
46
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
47
|
+
'class-validator-type-match/validate-nested-match': string;
|
|
48
|
+
'class-validator-type-match/type-decorator-match': string;
|
|
49
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
50
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
basic: {
|
|
54
|
+
plugins: string[];
|
|
55
|
+
rules: {
|
|
56
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
57
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
58
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
59
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
32
63
|
flatConfigs: {
|
|
33
64
|
recommended: {
|
|
34
65
|
name: string;
|
|
@@ -39,38 +70,38 @@ declare const _default: {
|
|
|
39
70
|
version: string;
|
|
40
71
|
};
|
|
41
72
|
rules: {
|
|
42
|
-
'decorator-type-match':
|
|
73
|
+
'decorator-type-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"mismatch" | "enumMismatch" | "invalidEachOption", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
43
74
|
name: string;
|
|
44
75
|
};
|
|
45
|
-
'optional-decorator-match':
|
|
76
|
+
'optional-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"missingOptionalDecorator" | "missingOptionalSyntax" | "conflictingDefiniteAssignment" | "undefinedUnionWithoutDecorator" | "undefinedUnionWithoutOptional" | "nullUnionIncorrect" | "redundantUndefinedInType", [{
|
|
46
77
|
strictNullChecks?: boolean;
|
|
47
78
|
checkDefaultValues?: boolean;
|
|
48
79
|
customOptionalDecorators?: string[];
|
|
49
|
-
}], unknown,
|
|
80
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
50
81
|
name: string;
|
|
51
82
|
};
|
|
52
|
-
'validate-nested-match':
|
|
83
|
+
'validate-nested-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"nestedArrayMismatch" | "missingValidateNested" | "missingEachOption" | "unnecessaryValidateNested" | "tupleValidationWarning" | "multiTypeUnionWarning" | "mixedComplexityUnionWarning" | "pickOmitWarning", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
53
84
|
name: string;
|
|
54
85
|
};
|
|
55
|
-
'type-decorator-match':
|
|
86
|
+
'type-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"typeMismatch" | "missingTypeDecorator", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
56
87
|
name: string;
|
|
57
88
|
};
|
|
58
|
-
'definite-assignment-match':
|
|
89
|
+
'definite-assignment-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDefiniteAssignment", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
59
90
|
name: string;
|
|
60
91
|
};
|
|
61
|
-
'dto-filename-match':
|
|
92
|
+
'dto-filename-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDtoClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
62
93
|
name: string;
|
|
63
94
|
};
|
|
64
95
|
};
|
|
65
96
|
};
|
|
66
97
|
};
|
|
67
98
|
rules: {
|
|
68
|
-
'class-validator-type-match/decorator-type-match':
|
|
69
|
-
'class-validator-type-match/optional-decorator-match':
|
|
70
|
-
'class-validator-type-match/validate-nested-match':
|
|
71
|
-
'class-validator-type-match/type-decorator-match':
|
|
72
|
-
'class-validator-type-match/definite-assignment-match':
|
|
73
|
-
'class-validator-type-match/dto-filename-match':
|
|
99
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
100
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
101
|
+
'class-validator-type-match/validate-nested-match': string;
|
|
102
|
+
'class-validator-type-match/type-decorator-match': string;
|
|
103
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
104
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
74
105
|
};
|
|
75
106
|
};
|
|
76
107
|
strict: {
|
|
@@ -82,38 +113,38 @@ declare const _default: {
|
|
|
82
113
|
version: string;
|
|
83
114
|
};
|
|
84
115
|
rules: {
|
|
85
|
-
'decorator-type-match':
|
|
116
|
+
'decorator-type-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"mismatch" | "enumMismatch" | "invalidEachOption", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
86
117
|
name: string;
|
|
87
118
|
};
|
|
88
|
-
'optional-decorator-match':
|
|
119
|
+
'optional-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"missingOptionalDecorator" | "missingOptionalSyntax" | "conflictingDefiniteAssignment" | "undefinedUnionWithoutDecorator" | "undefinedUnionWithoutOptional" | "nullUnionIncorrect" | "redundantUndefinedInType", [{
|
|
89
120
|
strictNullChecks?: boolean;
|
|
90
121
|
checkDefaultValues?: boolean;
|
|
91
122
|
customOptionalDecorators?: string[];
|
|
92
|
-
}], unknown,
|
|
123
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
93
124
|
name: string;
|
|
94
125
|
};
|
|
95
|
-
'validate-nested-match':
|
|
126
|
+
'validate-nested-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"nestedArrayMismatch" | "missingValidateNested" | "missingEachOption" | "unnecessaryValidateNested" | "tupleValidationWarning" | "multiTypeUnionWarning" | "mixedComplexityUnionWarning" | "pickOmitWarning", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
96
127
|
name: string;
|
|
97
128
|
};
|
|
98
|
-
'type-decorator-match':
|
|
129
|
+
'type-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"typeMismatch" | "missingTypeDecorator", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
99
130
|
name: string;
|
|
100
131
|
};
|
|
101
|
-
'definite-assignment-match':
|
|
132
|
+
'definite-assignment-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDefiniteAssignment", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
102
133
|
name: string;
|
|
103
134
|
};
|
|
104
|
-
'dto-filename-match':
|
|
135
|
+
'dto-filename-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDtoClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
105
136
|
name: string;
|
|
106
137
|
};
|
|
107
138
|
};
|
|
108
139
|
};
|
|
109
140
|
};
|
|
110
141
|
rules: {
|
|
111
|
-
'class-validator-type-match/decorator-type-match':
|
|
112
|
-
'class-validator-type-match/optional-decorator-match':
|
|
113
|
-
'class-validator-type-match/validate-nested-match':
|
|
114
|
-
'class-validator-type-match/type-decorator-match':
|
|
115
|
-
'class-validator-type-match/definite-assignment-match':
|
|
116
|
-
'class-validator-type-match/dto-filename-match':
|
|
142
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
143
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
144
|
+
'class-validator-type-match/validate-nested-match': string;
|
|
145
|
+
'class-validator-type-match/type-decorator-match': string;
|
|
146
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
147
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
117
148
|
};
|
|
118
149
|
};
|
|
119
150
|
basic: {
|
|
@@ -125,36 +156,36 @@ declare const _default: {
|
|
|
125
156
|
version: string;
|
|
126
157
|
};
|
|
127
158
|
rules: {
|
|
128
|
-
'decorator-type-match':
|
|
159
|
+
'decorator-type-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"mismatch" | "enumMismatch" | "invalidEachOption", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
129
160
|
name: string;
|
|
130
161
|
};
|
|
131
|
-
'optional-decorator-match':
|
|
162
|
+
'optional-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"missingOptionalDecorator" | "missingOptionalSyntax" | "conflictingDefiniteAssignment" | "undefinedUnionWithoutDecorator" | "undefinedUnionWithoutOptional" | "nullUnionIncorrect" | "redundantUndefinedInType", [{
|
|
132
163
|
strictNullChecks?: boolean;
|
|
133
164
|
checkDefaultValues?: boolean;
|
|
134
165
|
customOptionalDecorators?: string[];
|
|
135
|
-
}], unknown,
|
|
166
|
+
}], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
136
167
|
name: string;
|
|
137
168
|
};
|
|
138
|
-
'validate-nested-match':
|
|
169
|
+
'validate-nested-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"nestedArrayMismatch" | "missingValidateNested" | "missingEachOption" | "unnecessaryValidateNested" | "tupleValidationWarning" | "multiTypeUnionWarning" | "mixedComplexityUnionWarning" | "pickOmitWarning", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
139
170
|
name: string;
|
|
140
171
|
};
|
|
141
|
-
'type-decorator-match':
|
|
172
|
+
'type-decorator-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"typeMismatch" | "missingTypeDecorator", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
142
173
|
name: string;
|
|
143
174
|
};
|
|
144
|
-
'definite-assignment-match':
|
|
175
|
+
'definite-assignment-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDefiniteAssignment", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
145
176
|
name: string;
|
|
146
177
|
};
|
|
147
|
-
'dto-filename-match':
|
|
178
|
+
'dto-filename-match': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"incorrectDtoClassName", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener> & {
|
|
148
179
|
name: string;
|
|
149
180
|
};
|
|
150
181
|
};
|
|
151
182
|
};
|
|
152
183
|
};
|
|
153
184
|
rules: {
|
|
154
|
-
'class-validator-type-match/decorator-type-match':
|
|
155
|
-
'class-validator-type-match/optional-decorator-match':
|
|
156
|
-
'class-validator-type-match/definite-assignment-match':
|
|
157
|
-
'class-validator-type-match/dto-filename-match':
|
|
185
|
+
'class-validator-type-match/decorator-type-match': string;
|
|
186
|
+
'class-validator-type-match/optional-decorator-match': string;
|
|
187
|
+
'class-validator-type-match/definite-assignment-match': string;
|
|
188
|
+
'class-validator-type-match/dto-filename-match': string;
|
|
158
189
|
};
|
|
159
190
|
};
|
|
160
191
|
};
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ const legacyConfigs = {
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
|
-
// Flat configs for eslint.config.ts (classValidatorTypeMatch.
|
|
61
|
+
// Flat configs for eslint.config.ts (classValidatorTypeMatch.flatConfigs.recommended)
|
|
62
62
|
const flatConfigs = {
|
|
63
63
|
recommended: {
|
|
64
64
|
name: 'class-validator-type-match/recommended',
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type {ESLint, Linter, Rule} from 'eslint';
|
|
2
|
+
|
|
3
|
+
declare const plugin: ESLint.Plugin & {
|
|
4
|
+
meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
'decorator-type-match': Rule.RuleModule;
|
|
10
|
+
'optional-decorator-match': Rule.RuleModule;
|
|
11
|
+
'validate-nested-match': Rule.RuleModule;
|
|
12
|
+
'type-decorator-match': Rule.RuleModule;
|
|
13
|
+
'definite-assignment-match': Rule.RuleModule;
|
|
14
|
+
'dto-filename-match': Rule.RuleModule;
|
|
15
|
+
};
|
|
16
|
+
configs: {
|
|
17
|
+
recommended: Linter.LegacyConfig;
|
|
18
|
+
strict: Linter.LegacyConfig;
|
|
19
|
+
basic: Linter.LegacyConfig;
|
|
20
|
+
};
|
|
21
|
+
flatConfigs: {
|
|
22
|
+
recommended: Linter.Config;
|
|
23
|
+
strict: Linter.Config;
|
|
24
|
+
basic: Linter.Config;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export = plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-class-validator-type-match",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"description": "ESLint plugin to ensure class-validator decorators match TypeScript type annotations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"url": "https://github.com/robertlinde/eslint-plugin-class-validator-type-match"
|
|
17
17
|
},
|
|
18
18
|
"main": "dist/index.js",
|
|
19
|
-
"types": "
|
|
19
|
+
"types": "index.d.ts",
|
|
20
20
|
"files": [
|
|
21
|
-
"dist"
|
|
21
|
+
"dist",
|
|
22
|
+
"index.d.ts"
|
|
22
23
|
],
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "tsc",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"@typescript-eslint/rule-tester": "8.53.0",
|
|
47
48
|
"@vitest/coverage-v8": "4.0.17",
|
|
48
49
|
"eslint": "9.39.2",
|
|
49
|
-
"globals": "
|
|
50
|
+
"globals": "17.0.0",
|
|
50
51
|
"husky": "9.1.7",
|
|
51
52
|
"lint-staged": "16.2.7",
|
|
52
53
|
"prettier": "3.8.0",
|