@darraghor/eslint-plugin-nestjs-typed 6.0.0-rc.17 → 6.0.0-rc.2
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/configs/base.js +4 -3
- package/dist/configs/index.js +13 -0
- package/dist/configs/noSwagger.js +4 -4
- package/dist/configs/recommended.js +4 -4
- package/dist/index.js +64 -57
- package/dist/rules/allPropertiesAreWhitelisted/allPropertiesAreWhitelisted.js +13 -11
- package/dist/rules/allPropertiesHaveExplicitDefined/allPropertiesHaveExplicitDefined.js +17 -15
- package/dist/rules/apiEnumPropertyBestPractices/apiEnumPropertyBestPractices.js +22 -17
- package/dist/rules/apiEnumPropertyBestPractices/enumTestResultModel.js +6 -2
- package/dist/rules/apiMethodsShouldBeGuarded/apiMethodsShouldBeGuarded.js +16 -12
- package/dist/rules/apiMethodsShouldSpecifyApiOperation/apiMethodsShouldSpecifyApiOperation.js +13 -9
- package/dist/rules/apiMethodsShouldSpecifyApiResponse/apiMethodsShouldSpecifyApiResponse.js +13 -9
- package/dist/rules/apiPropertyMatchesPropertyOptionality/apiPropertyMatchesPropertyOptionality.js +18 -13
- package/dist/rules/apiPropertyReturningArrayShouldSetArray/apiPropertyReturningArrayShouldSetArray.js +24 -17
- package/dist/rules/apiPropertyReturningArrayShouldSetArray/arraySetResultModel.js +5 -2
- package/dist/rules/controllerDecoratedHasApiTags/controllerDecoratedHasApiTags.js +13 -9
- package/dist/rules/index.js +41 -36
- package/dist/rules/injectablesShouldBeProvided/injectableShouldBeProvided.js +18 -13
- package/dist/rules/noDuplicateDecorators/noDuplicateDecorators.js +14 -10
- package/dist/rules/paramDecoratorNameMatchesRouteParam/paramDecoratorNameMatchesRouteParam.js +26 -19
- package/dist/rules/paramDecoratorNameMatchesRouteParam/rule.testData.js +6 -3
- package/dist/rules/providerInjectedShouldMatchFactory/ProviderInjectedShouldMatchFactory.js +18 -12
- package/dist/rules/shouldSpecifyForbidUnknownValues/shouldSpecifyForbidUnknownValuesRule.js +26 -19
- package/dist/rules/sortModuleMetadataArrays/sortModuleMetadataArrays.js +23 -18
- package/dist/rules/validateNestedOfArrayShouldSetEach/arraySetResultModel.js +5 -2
- package/dist/rules/validateNestedOfArrayShouldSetEach/validateNestedOfArrayShouldSetEach.js +21 -14
- package/dist/rules/validateNonPrimitiveNeedsTypeDecorator/validateNonPrimitiveNeedsDecorators.js +33 -29
- package/dist/testing/fixtureSetup.js +10 -4
- package/dist/testing/preRun.js +4 -2
- package/dist/utils/ast.js +7 -4
- package/dist/utils/createRule.js +6 -3
- package/dist/utils/files/customFileEnumeratorWrapper.js +16 -9
- package/dist/utils/files/isFilteredPath.js +4 -2
- package/dist/utils/nestModules/models/NestProvidedInjectablesMap.js +6 -2
- package/dist/utils/nestModules/nestModuleAstParser.js +12 -9
- package/dist/utils/nestModules/nestProvidedInjectableMapper.js +52 -14
- package/dist/utils/nestModules/nestProvidedInjectableMapper.testData.js +12 -9
- package/dist/utils/nestModules/nestProviderAstParser.js +16 -13
- package/dist/utils/typedTokenHelpers.js +64 -25
- package/dist/utils/wellKnownSelectors.js +5 -2
- package/package.json +3 -12
- package/dist/configs/base.d.ts +0 -8
- package/dist/configs/noSwagger.d.ts +0 -7
- package/dist/configs/recommended.d.ts +0 -7
- package/dist/index.d.ts +0 -52
- package/dist/rules/allPropertiesAreWhitelisted/allPropertiesAreWhitelisted.d.ts +0 -2
- package/dist/rules/allPropertiesHaveExplicitDefined/allPropertiesHaveExplicitDefined.d.ts +0 -3
- package/dist/rules/apiEnumPropertyBestPractices/apiEnumPropertyBestPractices.d.ts +0 -6
- package/dist/rules/apiEnumPropertyBestPractices/enumTestResultModel.d.ts +0 -7
- package/dist/rules/apiMethodsShouldBeGuarded/apiMethodsShouldBeGuarded.d.ts +0 -4
- package/dist/rules/apiMethodsShouldSpecifyApiOperation/apiMethodsShouldSpecifyApiOperation.d.ts +0 -4
- package/dist/rules/apiMethodsShouldSpecifyApiResponse/apiMethodsShouldSpecifyApiResponse.d.ts +0 -4
- package/dist/rules/apiPropertyMatchesPropertyOptionality/apiPropertyMatchesPropertyOptionality.d.ts +0 -5
- package/dist/rules/apiPropertyReturningArrayShouldSetArray/apiPropertyReturningArrayShouldSetArray.d.ts +0 -5
- package/dist/rules/apiPropertyReturningArrayShouldSetArray/arraySetResultModel.d.ts +0 -5
- package/dist/rules/controllerDecoratedHasApiTags/controllerDecoratedHasApiTags.d.ts +0 -4
- package/dist/rules/index.d.ts +0 -23
- package/dist/rules/injectablesShouldBeProvided/injectableShouldBeProvided.d.ts +0 -9
- package/dist/rules/noDuplicateDecorators/noDuplicateDecorators.d.ts +0 -9
- package/dist/rules/paramDecoratorNameMatchesRouteParam/paramDecoratorNameMatchesRouteParam.d.ts +0 -21
- package/dist/rules/paramDecoratorNameMatchesRouteParam/rule.testData.d.ts +0 -10
- package/dist/rules/providerInjectedShouldMatchFactory/ProviderInjectedShouldMatchFactory.d.ts +0 -4
- package/dist/rules/shouldSpecifyForbidUnknownValues/shouldSpecifyForbidUnknownValuesRule.d.ts +0 -7
- package/dist/rules/sortModuleMetadataArrays/sortModuleMetadataArrays.d.ts +0 -11
- package/dist/rules/validateNestedOfArrayShouldSetEach/arraySetResultModel.d.ts +0 -5
- package/dist/rules/validateNestedOfArrayShouldSetEach/validateNestedOfArrayShouldSetEach.d.ts +0 -5
- package/dist/rules/validateNonPrimitiveNeedsTypeDecorator/validateNonPrimitiveNeedsDecorators.d.ts +0 -10
- package/dist/testing/fixtureSetup.d.ts +0 -1
- package/dist/testing/preRun.d.ts +0 -1
- package/dist/utils/ast.d.ts +0 -2
- package/dist/utils/createRule.d.ts +0 -2
- package/dist/utils/files/customFileEnumeratorWrapper.d.ts +0 -8
- package/dist/utils/files/isFilteredPath.d.ts +0 -4
- package/dist/utils/nestModules/models/NestProvidedInjectablesMap.d.ts +0 -5
- package/dist/utils/nestModules/nestModuleAstParser.d.ts +0 -7
- package/dist/utils/nestModules/nestProvidedInjectableMapper.d.ts +0 -14
- package/dist/utils/nestModules/nestProvidedInjectableMapper.testData.d.ts +0 -7
- package/dist/utils/nestModules/nestProviderAstParser.d.ts +0 -7
- package/dist/utils/typedTokenHelpers.d.ts +0 -59
- package/dist/utils/wellKnownSelectors.d.ts +0 -1
|
@@ -1,9 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.typedTokenHelpers = void 0;
|
|
40
|
+
const utils_1 = require("@typescript-eslint/utils");
|
|
41
|
+
const parser_1 = require("@typescript-eslint/parser");
|
|
42
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
43
|
+
const tsutilsImp = __importStar(require("ts-api-utils"));
|
|
5
44
|
const tsutils = tsutilsImp;
|
|
6
|
-
|
|
45
|
+
exports.typedTokenHelpers = {
|
|
7
46
|
decoratorsThatCouldMeanTheDevIsValidatingAnArray: [
|
|
8
47
|
"IsArray",
|
|
9
48
|
"ArrayMinSize",
|
|
@@ -15,7 +54,7 @@ export const typedTokenHelpers = {
|
|
|
15
54
|
],
|
|
16
55
|
isTypeArrayTypeOrUnionOfArrayTypes(node, parserService, checker) {
|
|
17
56
|
if (node.typeAnnotation?.typeAnnotation
|
|
18
|
-
.type === TSESTree.AST_NODE_TYPES.TSArrayType) {
|
|
57
|
+
.type === utils_1.TSESTree.AST_NODE_TYPES.TSArrayType) {
|
|
19
58
|
return true;
|
|
20
59
|
}
|
|
21
60
|
const nodeType = this.getNodeType(node, parserService, checker);
|
|
@@ -31,7 +70,7 @@ export const typedTokenHelpers = {
|
|
|
31
70
|
},
|
|
32
71
|
getNodeType(node, parserService, checker) {
|
|
33
72
|
const tsNode = parserService.esTreeNodeToTSNodeMap.get(node);
|
|
34
|
-
return typedTokenHelpers.getConstrainedTypeAtLocation(checker, tsNode);
|
|
73
|
+
return exports.typedTokenHelpers.getConstrainedTypeAtLocation(checker, tsNode);
|
|
35
74
|
},
|
|
36
75
|
expressionNodeIsArrayType(node, parserService, checker) {
|
|
37
76
|
const nodeType = this.getNodeType(node, parserService, checker);
|
|
@@ -40,11 +79,11 @@ export const typedTokenHelpers = {
|
|
|
40
79
|
getPropertyValueEqualsExpected(firstArgument, propertyName, expectedValue) {
|
|
41
80
|
let didMatchExpectedValues = false;
|
|
42
81
|
if (firstArgument !== undefined) {
|
|
43
|
-
const foundPropertyOfName = firstArgument.properties.find((p) => p.type === TSESTree.AST_NODE_TYPES.Property &&
|
|
82
|
+
const foundPropertyOfName = firstArgument.properties.find((p) => p.type === utils_1.TSESTree.AST_NODE_TYPES.Property &&
|
|
44
83
|
p.key.name === propertyName);
|
|
45
84
|
didMatchExpectedValues =
|
|
46
85
|
foundPropertyOfName !== undefined &&
|
|
47
|
-
foundPropertyOfName.type === TSESTree.AST_NODE_TYPES.Property &&
|
|
86
|
+
foundPropertyOfName.type === utils_1.TSESTree.AST_NODE_TYPES.Property &&
|
|
48
87
|
foundPropertyOfName.value.value ===
|
|
49
88
|
expectedValue;
|
|
50
89
|
}
|
|
@@ -70,7 +109,7 @@ export const typedTokenHelpers = {
|
|
|
70
109
|
return decorators || [];
|
|
71
110
|
},
|
|
72
111
|
parseStringToAst(code, path, context) {
|
|
73
|
-
return parse(code, {
|
|
112
|
+
return (0, parser_1.parse)(code, {
|
|
74
113
|
filePath: path,
|
|
75
114
|
range: true,
|
|
76
115
|
tokens: true,
|
|
@@ -80,12 +119,12 @@ export const typedTokenHelpers = {
|
|
|
80
119
|
},
|
|
81
120
|
isEnumType(type) {
|
|
82
121
|
// if for some reason this returns true...
|
|
83
|
-
if (tsutils.isTypeFlagSet(type,
|
|
122
|
+
if (tsutils.isTypeFlagSet(type, typescript_1.default.TypeFlags.Enum))
|
|
84
123
|
return true;
|
|
85
|
-
if (tsutils.isTypeFlagSet(type,
|
|
124
|
+
if (tsutils.isTypeFlagSet(type, typescript_1.default.TypeFlags.EnumLike))
|
|
86
125
|
return true;
|
|
87
126
|
// it's not an enum type if it's an enum literal type
|
|
88
|
-
if (tsutils.isTypeFlagSet(type,
|
|
127
|
+
if (tsutils.isTypeFlagSet(type, typescript_1.default.TypeFlags.EnumLiteral) &&
|
|
89
128
|
!type.isUnion())
|
|
90
129
|
return false;
|
|
91
130
|
// get the symbol and check if its value declaration is an enum declaration
|
|
@@ -94,10 +133,10 @@ export const typedTokenHelpers = {
|
|
|
94
133
|
return false;
|
|
95
134
|
const { valueDeclaration } = symbol;
|
|
96
135
|
return (valueDeclaration != null &&
|
|
97
|
-
valueDeclaration.kind ===
|
|
136
|
+
valueDeclaration.kind === typescript_1.default.SyntaxKind.EnumDeclaration);
|
|
98
137
|
},
|
|
99
138
|
isOptionalPropertyValue(node) {
|
|
100
|
-
const isUndefinedType = node.typeAnnotation?.typeAnnotation?.types?.find((t) => t.type === AST_NODE_TYPES.TSUndefinedKeyword) !== undefined;
|
|
139
|
+
const isUndefinedType = node.typeAnnotation?.typeAnnotation?.types?.find((t) => t.type === utils_1.AST_NODE_TYPES.TSUndefinedKeyword) !== undefined;
|
|
101
140
|
const isOptionalPropertyValue = node.optional || isUndefinedType || false;
|
|
102
141
|
return isOptionalPropertyValue;
|
|
103
142
|
},
|
|
@@ -121,7 +160,7 @@ export const typedTokenHelpers = {
|
|
|
121
160
|
if (!decoratorName) {
|
|
122
161
|
return false;
|
|
123
162
|
}
|
|
124
|
-
return imports.some((imp) => typedTokenHelpers.importIsDecorator(imp, decoratorName));
|
|
163
|
+
return imports.some((imp) => exports.typedTokenHelpers.importIsDecorator(imp, decoratorName));
|
|
125
164
|
},
|
|
126
165
|
/**
|
|
127
166
|
* Checks whether a decorator is a class validator decorator
|
|
@@ -132,8 +171,8 @@ export const typedTokenHelpers = {
|
|
|
132
171
|
if (!program) {
|
|
133
172
|
return false;
|
|
134
173
|
}
|
|
135
|
-
const imports = program.body.filter((node) => node.type === TSESTree.AST_NODE_TYPES.ImportDeclaration);
|
|
136
|
-
return typedTokenHelpers.decoratorIsImportedFromClassValidator(imports, decorator);
|
|
174
|
+
const imports = program.body.filter((node) => node.type === utils_1.TSESTree.AST_NODE_TYPES.ImportDeclaration);
|
|
175
|
+
return exports.typedTokenHelpers.decoratorIsImportedFromClassValidator(imports, decorator);
|
|
137
176
|
},
|
|
138
177
|
/**
|
|
139
178
|
* Gets the root program of a node
|
|
@@ -142,7 +181,7 @@ export const typedTokenHelpers = {
|
|
|
142
181
|
getRootProgram(node) {
|
|
143
182
|
let root = node;
|
|
144
183
|
while (root.parent) {
|
|
145
|
-
if (root.parent.type === TSESTree.AST_NODE_TYPES.Program) {
|
|
184
|
+
if (root.parent.type === utils_1.TSESTree.AST_NODE_TYPES.Program) {
|
|
146
185
|
return root.parent;
|
|
147
186
|
}
|
|
148
187
|
root = root.parent;
|
|
@@ -154,11 +193,11 @@ export const typedTokenHelpers = {
|
|
|
154
193
|
* @param node PropertyDefinition node
|
|
155
194
|
*/
|
|
156
195
|
getValidationDecorators(node, additionalCustomValidatorDecorators = []) {
|
|
157
|
-
const program = typedTokenHelpers.getRootProgram(node);
|
|
196
|
+
const program = exports.typedTokenHelpers.getRootProgram(node);
|
|
158
197
|
const { decorators } = node;
|
|
159
198
|
return (decorators.filter((decorator) => {
|
|
160
|
-
const isClassValidatorDecorator = typedTokenHelpers.decoratorIsClassValidatorDecorator(program, decorator);
|
|
161
|
-
const decoratorName = typedTokenHelpers.getDecoratorName(decorator);
|
|
199
|
+
const isClassValidatorDecorator = exports.typedTokenHelpers.decoratorIsClassValidatorDecorator(program, decorator);
|
|
200
|
+
const decoratorName = exports.typedTokenHelpers.getDecoratorName(decorator);
|
|
162
201
|
const isCustomClassValidatorDecorator = decoratorName === null
|
|
163
202
|
? false
|
|
164
203
|
: additionalCustomValidatorDecorators.includes(decoratorName);
|
|
@@ -186,14 +225,14 @@ export const typedTokenHelpers = {
|
|
|
186
225
|
* @param decorator
|
|
187
226
|
*/
|
|
188
227
|
getDecoratorName(decorator) {
|
|
189
|
-
if (decorator.expression.type !== TSESTree.AST_NODE_TYPES.CallExpression) {
|
|
228
|
+
if (decorator.expression.type !== utils_1.TSESTree.AST_NODE_TYPES.CallExpression) {
|
|
190
229
|
return null;
|
|
191
230
|
}
|
|
192
231
|
if (decorator.expression.callee.type !==
|
|
193
|
-
TSESTree.AST_NODE_TYPES.Identifier) {
|
|
232
|
+
utils_1.TSESTree.AST_NODE_TYPES.Identifier) {
|
|
194
233
|
return null;
|
|
195
234
|
}
|
|
196
235
|
return decorator.expression.callee.name;
|
|
197
236
|
},
|
|
198
237
|
};
|
|
199
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
238
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZWRUb2tlbkhlbHBlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvdHlwZWRUb2tlbkhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsb0RBQTRFO0FBQzVFLHNEQUFnRTtBQUNoRSw0REFBNEI7QUFDNUIseURBQTJDO0FBRTNDLE1BQU0sT0FBTyxHQUFHLFVBQVUsQ0FBQztBQUVkLFFBQUEsaUJBQWlCLEdBQUc7SUFDN0IsZ0RBQWdELEVBQUU7UUFDOUMsU0FBUztRQUNULGNBQWM7UUFDZCxjQUFjO1FBQ2QsZUFBZTtRQUNmLGtCQUFrQjtRQUNsQixlQUFlO1FBQ2YsYUFBYTtLQUNoQjtJQUNELGtDQUFrQyxDQUM5QixJQUFtQixFQUNuQixhQUE2QixFQUM3QixPQUF1QjtRQUV2QixJQUNLLElBQW9DLENBQUMsY0FBYyxFQUFFLGNBQWM7YUFDL0QsSUFBSSxLQUFLLGdCQUFRLENBQUMsY0FBYyxDQUFDLFdBQVcsRUFDbkQsQ0FBQztZQUNDLE9BQU8sSUFBSSxDQUFDO1FBQ2hCLENBQUM7UUFFRCxNQUFNLFFBQV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QyxDQUFDLElBQUksRUFBRSxDQUNYLENBQUM7SUFDTixDQUFDO0lBQ0Q7OztPQUdHO0lBQ0gsaUJBQWlCLENBQUMsU0FBNkI7UUFDM0MsTUFBTSxhQUFhLEdBQUcsSUFBSSxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBRXZELE9BQU8sYUFBYSxLQUFLLFFBQVEsQ0FBQztJQUN0QyxDQUFDO0lBQ0Q7O09BRUc7SUFDSCxtQkFBbUIsQ0FBQyxTQUE2QjtRQUM3QyxNQUFNLGFBQWEsR0FBRyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLENBQUM7UUFFdkQsT0FBTyxhQUFhLEtBQUssVUFBVSxDQUFDO0lBQ3hDLENBQUM7SUFDRDs7OztPQUlHO0lBQ0gsZ0JBQWdCLENBQUMsU0FBNkI7UUFDMUMsSUFDSSxTQUFTLENBQUMsVUFBVSxDQUFDLElBQUksS0FBSyxnQkFBUSxDQUFDLGNBQWMsQ0FBQyxjQUFjLEVBQ3RFLENBQUM7WUFDQyxPQUFPLElBQUksQ0FBQztRQUNoQixDQUFDO1FBRUQsSUFDSSxTQUFTLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJO1lBQ2hDLGdCQUFRLENBQUMsY0FBYyxDQUFDLFVBQVUsRUFDcEMsQ0FBQztZQUNDLE9BQU8sSUFBSSxDQUFDO1FBQ2hCLENBQUM7UUFFRCxPQUFPLFNBQVMsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQztJQUM1QyxDQUFDO0NBQ0osQ0FBQyJ9
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODULE_CLASS_DECORATOR = void 0;
|
|
4
|
+
exports.MODULE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name="Module"]';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2VsbEtub3duU2VsZWN0b3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL3dlbGxLbm93blNlbGVjdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHNCQUFzQixHQUMvQiwrREFBK0QsQ0FBQyJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darraghor/eslint-plugin-nestjs-typed",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.2",
|
|
4
4
|
"description": "Eslint rules for nestjs projects",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -Rf ./dist/",
|
|
@@ -47,16 +47,7 @@
|
|
|
47
47
|
"url": "https://darraghoriordan.com"
|
|
48
48
|
},
|
|
49
49
|
"main": "dist/index.js",
|
|
50
|
-
"
|
|
51
|
-
"exports": {
|
|
52
|
-
".": {
|
|
53
|
-
"types": "./dist/index.d.ts",
|
|
54
|
-
"default": "./dist/index.js"
|
|
55
|
-
},
|
|
56
|
-
"./package.json": "./package.json"
|
|
57
|
-
},
|
|
58
|
-
"types": "./dist/index.d.ts",
|
|
59
|
-
"sideEffects": false,
|
|
50
|
+
"types": "index.d.ts",
|
|
60
51
|
"dependencies": {
|
|
61
52
|
"@typescript-eslint/scope-manager": "^8.21.0",
|
|
62
53
|
"@typescript-eslint/utils": "^8.21.0",
|
|
@@ -100,7 +91,7 @@
|
|
|
100
91
|
"peerDependencies": {
|
|
101
92
|
"@typescript-eslint/parser": "^7.0.0 || ^8.0.0",
|
|
102
93
|
"class-validator": "*",
|
|
103
|
-
"eslint": "
|
|
94
|
+
"eslint": "^9.0.0"
|
|
104
95
|
},
|
|
105
96
|
"keywords": [
|
|
106
97
|
"eslint",
|
package/dist/configs/base.d.ts
DELETED
package/dist/index.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { FlatConfig } from "@typescript-eslint/utils/ts-eslint";
|
|
2
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
3
|
-
export declare const parser: TSESLint.FlatConfig.Parser;
|
|
4
|
-
declare const classicPlugin: {
|
|
5
|
-
configs: {
|
|
6
|
-
recommended: {
|
|
7
|
-
extends: string[];
|
|
8
|
-
rules: Partial<import("eslint").Linter.RulesRecord>;
|
|
9
|
-
};
|
|
10
|
-
"no-swagger": {
|
|
11
|
-
extends: string[];
|
|
12
|
-
rules: Partial<import("eslint").Linter.RulesRecord>;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
rules: {
|
|
16
|
-
"all-properties-have-explicit-defined": TSESLint.RuleModule<"missing-is-defined-decorator" | "missing-is-optional-decorator" | "conflicting-defined-decorators-defined-optional" | "conflicting-defined-decorators-defined-validate-if" | "conflicting-defined-decorators-optional-validate-if" | "conflicting-defined-decorators-all", [], unknown, TSESLint.RuleListener>;
|
|
17
|
-
"api-property-matches-property-optionality": TSESLint.RuleModule<"shouldUseOptionalDecorator" | "shouldUseRequiredDecorator", [], unknown, TSESLint.RuleListener>;
|
|
18
|
-
"injectable-should-be-provided": TSESLint.RuleModule<"injectableInModule" | "controllersInModule", [{
|
|
19
|
-
src: string[];
|
|
20
|
-
filterFromPaths: string[];
|
|
21
|
-
}], unknown, TSESLint.RuleListener>;
|
|
22
|
-
"no-duplicate-decorators": TSESLint.RuleModule<"noDuplicateDecorators", import("./rules/noDuplicateDecorators/noDuplicateDecorators.js").NoDuplicateDecoratorsOptions, unknown, TSESLint.RuleListener>;
|
|
23
|
-
"provided-injected-should-match-factory-parameters": TSESLint.RuleModule<"mainMessage", [], unknown, TSESLint.RuleListener>;
|
|
24
|
-
"controllers-should-supply-api-tags": TSESLint.RuleModule<"shouldUseApiTagDecorator", [], unknown, TSESLint.RuleListener>;
|
|
25
|
-
"api-method-should-specify-api-response": TSESLint.RuleModule<"shouldSpecifyApiResponse", [], unknown, TSESLint.RuleListener>;
|
|
26
|
-
"api-method-should-specify-api-operation": TSESLint.RuleModule<"shouldSpecifyApiOperation", [], unknown, TSESLint.RuleListener>;
|
|
27
|
-
"api-enum-property-best-practices": TSESLint.RuleModule<"needsEnumNameAdded" | "needsTypeRemoved" | "enumNameShouldMatchType", [], unknown, TSESLint.RuleListener>;
|
|
28
|
-
"api-property-returning-array-should-set-array": TSESLint.RuleModule<"shouldSetArrayPropertyTrue" | "shouldSetArrayPropertyFalse", [], unknown, TSESLint.RuleListener>;
|
|
29
|
-
"should-specify-forbid-unknown-values": TSESLint.RuleModule<"shouldSpecifyForbidUnknownValues", [], unknown, TSESLint.RuleListener>;
|
|
30
|
-
"param-decorator-name-matches-route-param": TSESLint.RuleModule<"paramIdentifierDoesntNeedColon" | "paramIdentifierShouldMatch", [], unknown, TSESLint.RuleListener>;
|
|
31
|
-
"validated-non-primitive-property-needs-type-decorator": TSESLint.RuleModule<"shouldUseTypeDecorator" | "autofixWithTypeDecorator", import("./rules/validateNonPrimitiveNeedsTypeDecorator/validateNonPrimitiveNeedsDecorators.js").ValidateNonPrimitivePropertyTypeDecoratorOptions, unknown, TSESLint.RuleListener>;
|
|
32
|
-
"validate-nested-of-array-should-set-each": TSESLint.RuleModule<"shouldSetEachPropertyTrue" | "shouldSetEachPropertyFalse", [], unknown, TSESLint.RuleListener>;
|
|
33
|
-
"all-properties-are-whitelisted": TSESLint.RuleModule<"missing-property-decorator", [], unknown, TSESLint.RuleListener>;
|
|
34
|
-
"api-methods-should-be-guarded": TSESLint.RuleModule<"apiMethodsShouldBeGuarded", [], unknown, TSESLint.RuleListener>;
|
|
35
|
-
"sort-module-metadata-arrays": TSESLint.RuleModule<"moduleMetadataArraysAreSorted", import("./rules/sortModuleMetadataArrays/sortModuleMetadataArrays.js").RuleOptions, unknown, TSESLint.RuleListener>;
|
|
36
|
-
};
|
|
37
|
-
meta: {
|
|
38
|
-
name: string;
|
|
39
|
-
version: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare const plugin: TSESLint.FlatConfig.Plugin;
|
|
43
|
-
export { classicPlugin };
|
|
44
|
-
export type ConfigArray = TSESLint.FlatConfig.ConfigArray;
|
|
45
|
-
declare const _default: {
|
|
46
|
-
plugin: FlatConfig.Plugin;
|
|
47
|
-
configs: {
|
|
48
|
-
flatRecommended: ConfigArray;
|
|
49
|
-
flatNoSwagger: ConfigArray;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
declare const rule: ESLintUtils.RuleModule<"missing-is-defined-decorator" | "missing-is-optional-decorator" | "conflicting-defined-decorators-defined-optional" | "conflicting-defined-decorators-defined-validate-if" | "conflicting-defined-decorators-optional-validate-if" | "conflicting-defined-decorators-all", [], unknown, ESLintUtils.RuleListener>;
|
|
3
|
-
export default rule;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ESLintUtils, TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
import { EnumTestResultModel } from "./enumTestResultModel.js";
|
|
3
|
-
export declare const hasEnumSpecifiedCorrectly: (node: TSESTree.Node, isEnumType: boolean) => EnumTestResultModel;
|
|
4
|
-
export declare const needsEnumNameMatchingEnumType: (enumNameProperty: TSESTree.Property, enumProperty: TSESTree.Property) => boolean;
|
|
5
|
-
declare const rule: ESLintUtils.RuleModule<"needsEnumNameAdded" | "needsTypeRemoved" | "enumNameShouldMatchType", [], unknown, ESLintUtils.RuleListener>;
|
|
6
|
-
export default rule;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const apiMethodsShouldBeGuarded: (node: TSESTree.MethodDefinition) => boolean;
|
|
3
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"apiMethodsShouldBeGuarded", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
export default rule;
|
package/dist/rules/apiMethodsShouldSpecifyApiOperation/apiMethodsShouldSpecifyApiOperation.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const shouldUseApiResponseDecorator: (node: TSESTree.MethodDefinition) => boolean;
|
|
3
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyApiOperation", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
export default rule;
|
package/dist/rules/apiMethodsShouldSpecifyApiResponse/apiMethodsShouldSpecifyApiResponse.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const shouldUseApiResponseDecorator: (node: TSESTree.MethodDefinition) => boolean;
|
|
3
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyApiResponse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
export default rule;
|
package/dist/rules/apiPropertyMatchesPropertyOptionality/apiPropertyMatchesPropertyOptionality.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const shouldUseRequiredDecorator: (node: TSESTree.PropertyDefinition) => boolean;
|
|
3
|
-
export declare const shouldUseOptionalDecorator: (node: TSESTree.PropertyDefinition) => boolean;
|
|
4
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldUseOptionalDecorator" | "shouldUseRequiredDecorator", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
|
-
export default rule;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
import ArraySetResultModel from "./arraySetResultModel.js";
|
|
3
|
-
export declare const shouldSetArrayProperty: (node: TSESTree.PropertyDefinition) => ArraySetResultModel;
|
|
4
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSetArrayPropertyTrue" | "shouldSetArrayPropertyFalse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
|
-
export default rule;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const shouldUseApiTagDecorator: (node: TSESTree.ClassDeclaration) => boolean;
|
|
3
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldUseApiTagDecorator", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
export default rule;
|
package/dist/rules/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const allRules: {
|
|
2
|
-
"all-properties-have-explicit-defined": import("@typescript-eslint/utils/ts-eslint").RuleModule<"missing-is-defined-decorator" | "missing-is-optional-decorator" | "conflicting-defined-decorators-defined-optional" | "conflicting-defined-decorators-defined-validate-if" | "conflicting-defined-decorators-optional-validate-if" | "conflicting-defined-decorators-all", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
3
|
-
"api-property-matches-property-optionality": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldUseOptionalDecorator" | "shouldUseRequiredDecorator", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
"injectable-should-be-provided": import("@typescript-eslint/utils/ts-eslint").RuleModule<"injectableInModule" | "controllersInModule", [{
|
|
5
|
-
src: string[];
|
|
6
|
-
filterFromPaths: string[];
|
|
7
|
-
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
8
|
-
"no-duplicate-decorators": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDuplicateDecorators", import("./noDuplicateDecorators/noDuplicateDecorators.js").NoDuplicateDecoratorsOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
9
|
-
"provided-injected-should-match-factory-parameters": import("@typescript-eslint/utils/ts-eslint").RuleModule<"mainMessage", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
10
|
-
"controllers-should-supply-api-tags": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldUseApiTagDecorator", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
11
|
-
"api-method-should-specify-api-response": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyApiResponse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
12
|
-
"api-method-should-specify-api-operation": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyApiOperation", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
13
|
-
"api-enum-property-best-practices": import("@typescript-eslint/utils/ts-eslint").RuleModule<"needsEnumNameAdded" | "needsTypeRemoved" | "enumNameShouldMatchType", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
14
|
-
"api-property-returning-array-should-set-array": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSetArrayPropertyTrue" | "shouldSetArrayPropertyFalse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
15
|
-
"should-specify-forbid-unknown-values": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyForbidUnknownValues", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
16
|
-
"param-decorator-name-matches-route-param": import("@typescript-eslint/utils/ts-eslint").RuleModule<"paramIdentifierDoesntNeedColon" | "paramIdentifierShouldMatch", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
17
|
-
"validated-non-primitive-property-needs-type-decorator": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldUseTypeDecorator" | "autofixWithTypeDecorator", import("./validateNonPrimitiveNeedsTypeDecorator/validateNonPrimitiveNeedsDecorators.js").ValidateNonPrimitivePropertyTypeDecoratorOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
18
|
-
"validate-nested-of-array-should-set-each": import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSetEachPropertyTrue" | "shouldSetEachPropertyFalse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
19
|
-
"all-properties-are-whitelisted": import("@typescript-eslint/utils/ts-eslint").RuleModule<"missing-property-decorator", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
20
|
-
"api-methods-should-be-guarded": import("@typescript-eslint/utils/ts-eslint").RuleModule<"apiMethodsShouldBeGuarded", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
21
|
-
"sort-module-metadata-arrays": import("@typescript-eslint/utils/ts-eslint").RuleModule<"moduleMetadataArraysAreSorted", import("./sortModuleMetadataArrays/sortModuleMetadataArrays.js").RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
22
|
-
};
|
|
23
|
-
export default allRules;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
-
type Options = [
|
|
3
|
-
{
|
|
4
|
-
src: string[];
|
|
5
|
-
filterFromPaths: string[];
|
|
6
|
-
}
|
|
7
|
-
];
|
|
8
|
-
declare const rule: TSESLint.RuleModule<"injectableInModule" | "controllersInModule", Options, unknown, TSESLint.RuleListener>;
|
|
9
|
-
export default rule;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type NoDuplicateDecoratorsOptions = [
|
|
2
|
-
{
|
|
3
|
-
customList: string[];
|
|
4
|
-
}
|
|
5
|
-
];
|
|
6
|
-
export declare const shouldTrigger: () => boolean;
|
|
7
|
-
export declare const standardDecoratorsToValidate: string[];
|
|
8
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDuplicateDecorators", NoDuplicateDecoratorsOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
9
|
-
export default rule;
|
package/dist/rules/paramDecoratorNameMatchesRouteParam/paramDecoratorNameMatchesRouteParam.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
interface ResultModel {
|
|
3
|
-
hasColonInName: boolean;
|
|
4
|
-
paramNameNotMatchedInPath: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const parsePathParts: (decorator: TSESTree.Decorator) => string[];
|
|
7
|
-
/**
|
|
8
|
-
* nestjs allows for paths with _+?()*
|
|
9
|
-
* this rule doesn't support parsing those so we'll just pass
|
|
10
|
-
*/
|
|
11
|
-
export declare const hasPathPartsAnyRegexParams: (pathPartsToCheck: string[]) => boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Checks if there is a matching path part for the paramName
|
|
14
|
-
* @param paramName
|
|
15
|
-
* @param pathPartsToCheck
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
export declare const isParameterNameIncludedInAPathPart: (paramName: string, pathPartsToCheck: string[]) => boolean;
|
|
19
|
-
export declare const shouldTrigger: (decorator: TSESTree.Decorator) => ResultModel;
|
|
20
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"paramIdentifierDoesntNeedColon" | "paramIdentifierShouldMatch", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
21
|
-
export default rule;
|
package/dist/rules/providerInjectedShouldMatchFactory/ProviderInjectedShouldMatchFactory.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const hasMismatchedInjected: (node: TSESTree.VariableDeclarator) => boolean;
|
|
3
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"mainMessage", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
-
export default rule;
|
package/dist/rules/shouldSpecifyForbidUnknownValues/shouldSpecifyForbidUnknownValuesRule.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const isValidationPipeNewExpression: (node: TSESTree.Node) => boolean;
|
|
3
|
-
export declare const checkObjectExpression: (os: TSESTree.ObjectExpression) => boolean;
|
|
4
|
-
export declare const shouldTriggerNewExpressionHasProperty: (node: TSESTree.Node) => boolean;
|
|
5
|
-
export declare const shouldTriggerForVariableDeclaratorExpression: (node: TSESTree.VariableDeclarator) => boolean;
|
|
6
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSpecifyForbidUnknownValues", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
|
-
export default rule;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
export type RuleOptions = [
|
|
3
|
-
{
|
|
4
|
-
locale?: string;
|
|
5
|
-
}
|
|
6
|
-
];
|
|
7
|
-
export type ValidModuleNodeTypes = TSESTree.Identifier | TSESTree.CallExpression;
|
|
8
|
-
export declare const isValidModuleMetaPropertyType: (node: TSESTree.Expression | TSESTree.SpreadElement | null) => node is ValidModuleNodeTypes;
|
|
9
|
-
export declare const getRelevantNodeName: (node: TSESTree.Node) => string;
|
|
10
|
-
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moduleMetadataArraysAreSorted", RuleOptions, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
11
|
-
export default _default;
|
package/dist/rules/validateNestedOfArrayShouldSetEach/validateNestedOfArrayShouldSetEach.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
import ArraySetResultModel from "./arraySetResultModel.js";
|
|
3
|
-
export declare const shouldSetArrayProperty: (node: TSESTree.PropertyDefinition) => ArraySetResultModel;
|
|
4
|
-
declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"shouldSetEachPropertyTrue" | "shouldSetEachPropertyFalse", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
|
-
export default rule;
|
package/dist/rules/validateNonPrimitiveNeedsTypeDecorator/validateNonPrimitiveNeedsDecorators.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
export type ValidateNonPrimitivePropertyTypeDecoratorOptions = [
|
|
3
|
-
{
|
|
4
|
-
additionalTypeDecorators: string[];
|
|
5
|
-
additionalCustomValidatorDecorators: string[];
|
|
6
|
-
}
|
|
7
|
-
];
|
|
8
|
-
export declare const shouldTrigger: () => boolean;
|
|
9
|
-
declare const rule: ESLintUtils.RuleModule<"shouldUseTypeDecorator" | "autofixWithTypeDecorator", ValidateNonPrimitivePropertyTypeDecoratorOptions, unknown, ESLintUtils.RuleListener>;
|
|
10
|
-
export default rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFixturesRootDirectory(): string;
|
package/dist/testing/preRun.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "reflect-metadata";
|
package/dist/utils/ast.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
import { NestProvidedInjectablesMap } from "./models/NestProvidedInjectablesMap.js";
|
|
3
|
-
export declare const nestModuleAstParser: {
|
|
4
|
-
findNestModuleClass(ast: TSESTree.Program): TSESTree.ClassDeclaration | null;
|
|
5
|
-
mapNestModuleDecorator(n: TSESTree.ClassDeclaration, path: string): [string, NestProvidedInjectablesMap] | null;
|
|
6
|
-
mapModuleDecoratorOptionProperty(moduleDecorator: TSESTree.Decorator, propertyName: string): Set<string>;
|
|
7
|
-
};
|