@nest-boot/eslint-plugin 7.0.4 → 7.0.5
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/rules/graphql/graphql-field-config-from-types.d.ts +3 -1
- package/dist/rules/graphql/graphql-field-config-from-types.js +36 -36
- package/dist/rules/graphql/graphql-field-config-from-types.js.map +1 -1
- package/dist/rules/graphql/graphql-field-definite-assignment.d.ts +3 -1
- package/dist/rules/graphql/graphql-field-definite-assignment.js +13 -13
- package/dist/rules/graphql/graphql-field-definite-assignment.js.map +1 -1
- package/dist/rules/import/import-bullmq.d.ts +3 -1
- package/dist/rules/import/import-bullmq.js +4 -4
- package/dist/rules/import/import-bullmq.js.map +1 -1
- package/dist/rules/import/import-graphql.d.ts +3 -1
- package/dist/rules/import/import-graphql.js +4 -4
- package/dist/rules/import/import-graphql.js.map +1 -1
- package/dist/rules/import/import-mikro-orm.d.ts +3 -1
- package/dist/rules/import/import-mikro-orm.js +4 -4
- package/dist/rules/import/import-mikro-orm.js.map +1 -1
- package/dist/rules/index.d.ts +21 -7
- package/dist/rules/mikro-orm/entity-field-definite-assignment.d.ts +3 -1
- package/dist/rules/mikro-orm/entity-field-definite-assignment.js +10 -10
- package/dist/rules/mikro-orm/entity-field-definite-assignment.js.map +1 -1
- package/dist/rules/mikro-orm/entity-property-config-from-types.d.ts +3 -1
- package/dist/rules/mikro-orm/entity-property-config-from-types.js +105 -105
- package/dist/rules/mikro-orm/entity-property-config-from-types.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/createRule.d.ts +3 -1
- package/dist/utils/decorators.d.ts +16 -16
- package/dist/utils/decorators.js +16 -16
- package/package.json +12 -7
- package/src/rules/graphql/graphql-field-config-from-types.spec.ts +18 -18
- package/src/rules/graphql/graphql-field-config-from-types.ts +37 -37
- package/src/rules/graphql/graphql-field-definite-assignment.spec.ts +11 -11
- package/src/rules/graphql/graphql-field-definite-assignment.ts +13 -13
- package/src/rules/import/import-bullmq.spec.ts +9 -9
- package/src/rules/import/import-bullmq.ts +5 -4
- package/src/rules/import/import-graphql.spec.ts +8 -8
- package/src/rules/import/import-graphql.ts +4 -4
- package/src/rules/import/import-mikro-orm.spec.ts +8 -8
- package/src/rules/import/import-mikro-orm.ts +4 -4
- package/src/rules/mikro-orm/entity-field-definite-assignment.spec.ts +18 -18
- package/src/rules/mikro-orm/entity-field-definite-assignment.ts +10 -10
- package/src/rules/mikro-orm/entity-property-config-from-types.spec.ts +22 -22
- package/src/rules/mikro-orm/entity-property-config-from-types.ts +110 -109
- package/src/utils/decorators.ts +16 -16
package/src/utils/decorators.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/utils";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @param classDeclaration
|
|
6
|
-
* @param decoratorNames
|
|
7
|
-
* @returns
|
|
4
|
+
* Checks whether a class has the specified decorator(s).
|
|
5
|
+
* @param classDeclaration - The class declaration node.
|
|
6
|
+
* @param decoratorNames - Decorator name(s) (can be a string or an array of strings).
|
|
7
|
+
* @returns Whether the class has the specified decorator(s).
|
|
8
8
|
*/
|
|
9
9
|
export function hasClassDecorator(
|
|
10
10
|
classDeclaration: TSESTree.ClassDeclaration,
|
|
@@ -26,10 +26,10 @@ export function hasClassDecorator(
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @param propertyDefinition
|
|
31
|
-
* @param decoratorNames
|
|
32
|
-
* @returns
|
|
29
|
+
* Checks whether a property has the specified decorator(s).
|
|
30
|
+
* @param propertyDefinition - The property definition node.
|
|
31
|
+
* @param decoratorNames - Decorator name(s) (can be a string or an array of strings).
|
|
32
|
+
* @returns Whether the property has the specified decorator(s).
|
|
33
33
|
*/
|
|
34
34
|
export function hasPropertyDecorator(
|
|
35
35
|
propertyDefinition: TSESTree.PropertyDefinition,
|
|
@@ -51,10 +51,10 @@ export function hasPropertyDecorator(
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @param classDeclaration
|
|
56
|
-
* @param decoratorName
|
|
57
|
-
* @returns
|
|
54
|
+
* Gets a decorator from a class declaration.
|
|
55
|
+
* @param classDeclaration - The class declaration node.
|
|
56
|
+
* @param decoratorName - The decorator name.
|
|
57
|
+
* @returns The decorator node, or null if not found.
|
|
58
58
|
*/
|
|
59
59
|
export function getClassDecorator(
|
|
60
60
|
classDeclaration: TSESTree.ClassDeclaration,
|
|
@@ -72,10 +72,10 @@ export function getClassDecorator(
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @param propertyDefinition
|
|
77
|
-
* @param decoratorName
|
|
78
|
-
* @returns
|
|
75
|
+
* Gets a decorator from a property definition.
|
|
76
|
+
* @param propertyDefinition - The property definition node.
|
|
77
|
+
* @param decoratorName - The decorator name.
|
|
78
|
+
* @returns The decorator node, or null if not found.
|
|
79
79
|
*/
|
|
80
80
|
export function getPropertyDecorator(
|
|
81
81
|
propertyDefinition: TSESTree.PropertyDefinition,
|