eslint-plugin-class-validator-type-match 4.1.12 → 4.2.1

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.
@@ -110,13 +110,12 @@ exports.default = createRule({
110
110
  })
111
111
  .filter((name) => name !== null);
112
112
  const { typeAnnotation } = node.typeAnnotation;
113
- let actualType = null;
114
113
  /**
115
114
  * Determine the actual TypeScript type from the annotation.
116
115
  * Supports primitive types, arrays, type references, literals, and intersections.
117
116
  * Uses TypeScript's type checker when available to resolve type aliases.
118
117
  */
119
- actualType = (0, type_helpers_util_1.getTypeString)(typeAnnotation, checker, esTreeNodeMap);
118
+ const actualType = (0, type_helpers_util_1.getTypeString)(typeAnnotation, checker, esTreeNodeMap);
120
119
  // Skip if we couldn't determine the type
121
120
  if (!actualType)
122
121
  return;
@@ -254,8 +254,7 @@ exports.default = createRule({
254
254
  const typeNode = node.typeAnnotation.typeAnnotation;
255
255
  if (typeNode.type !== 'TSUnionType')
256
256
  return null;
257
- const sourceCode = context.getSourceCode();
258
- const typeText = sourceCode.getText(typeNode);
257
+ const typeText = context.sourceCode.getText(typeNode);
259
258
  // Remove | undefined or undefined | from the union
260
259
  const fixedType = typeText
261
260
  .replace(/\s*\|\s*undefined\s*$/, '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-class-validator-type-match",
3
- "version": "4.1.12",
3
+ "version": "4.2.1",
4
4
  "description": "ESLint plugin to ensure class-validator decorators match TypeScript type annotations",
5
5
  "keywords": [
6
6
  "eslint",
@@ -34,28 +34,28 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@typescript-eslint/parser": "^8.0.0",
37
- "eslint": "^9.0.0"
37
+ "eslint": "^9.0.0 || ^10.0.0"
38
38
  },
39
39
  "dependencies": {
40
- "@typescript-eslint/utils": "8.61.1"
40
+ "@typescript-eslint/utils": "8.63.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@commitlint/cli": "21.0.2",
44
- "@commitlint/config-conventional": "21.0.2",
45
- "@eslint/js": "9.39.4",
46
- "@typescript-eslint/parser": "8.61.1",
47
- "@typescript-eslint/rule-tester": "8.61.1",
48
- "@vitest/coverage-v8": "4.1.9",
49
- "eslint": "9.39.4",
50
- "globals": "17.6.0",
43
+ "@commitlint/cli": "21.2.1",
44
+ "@commitlint/config-conventional": "21.2.0",
45
+ "@eslint/js": "10.0.1",
46
+ "@typescript-eslint/parser": "8.63.0",
47
+ "@typescript-eslint/rule-tester": "8.63.0",
48
+ "@vitest/coverage-v8": "4.1.10",
49
+ "eslint": "10.7.0",
50
+ "globals": "17.7.0",
51
51
  "husky": "9.1.7",
52
- "lint-staged": "17.0.7",
53
- "prettier": "3.8.4",
52
+ "lint-staged": "17.0.8",
53
+ "prettier": "3.9.5",
54
54
  "typescript": "5.9.3",
55
- "typescript-eslint": "8.61.1",
56
- "vitest": "4.1.9"
55
+ "typescript-eslint": "8.63.0",
56
+ "vitest": "4.1.10"
57
57
  },
58
58
  "engines": {
59
- "node": "25.9.0"
59
+ "node": "26.5.0"
60
60
  }
61
61
  }