@kouts/eslint-config 2.0.7 → 2.0.8

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.cjs CHANGED
@@ -353,7 +353,15 @@ const typescript = [
353
353
  }
354
354
  ],
355
355
  // Disallow non-null assertions using the ! postfix operator
356
- "@typescript-eslint/no-non-null-assertion": "error"
356
+ "@typescript-eslint/no-non-null-assertion": "error",
357
+ // Disallow enums
358
+ "no-restricted-syntax": [
359
+ "error",
360
+ {
361
+ selector: "TSEnumDeclaration",
362
+ message: `Enums introduce unexpected runtime behavior, break TypeScript's structural typing, and add unnecessary complexity. Use union types or 'as const' objects instead.`
363
+ }
364
+ ]
357
365
  }
358
366
  }
359
367
  ];
package/dist/index.js CHANGED
@@ -352,7 +352,15 @@ const typescript = [
352
352
  }
353
353
  ],
354
354
  // Disallow non-null assertions using the ! postfix operator
355
- "@typescript-eslint/no-non-null-assertion": "error"
355
+ "@typescript-eslint/no-non-null-assertion": "error",
356
+ // Disallow enums
357
+ "no-restricted-syntax": [
358
+ "error",
359
+ {
360
+ selector: "TSEnumDeclaration",
361
+ message: `Enums introduce unexpected runtime behavior, break TypeScript's structural typing, and add unnecessary complexity. Use union types or 'as const' objects instead.`
362
+ }
363
+ ]
356
364
  }
357
365
  }
358
366
  ];
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@kouts/eslint-config",
3
3
  "type": "module",
4
- "version": "2.0.7",
5
- "packageManager": "pnpm@9.15.4",
4
+ "version": "2.0.8",
5
+ "packageManager": "pnpm@9.15.6",
6
6
  "engines": {
7
7
  "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
8
8
  },
@@ -45,7 +45,7 @@
45
45
  "dev": "pkgroll --watch",
46
46
  "build": "pkgroll --clean-dist",
47
47
  "inspect": "npx @eslint/config-inspector --config eslint.config.ts",
48
- "test": "echo \"Error: no test specified\" && exit 1",
48
+ "test:unit": "vitest",
49
49
  "lint": "pnpm run build && eslint .",
50
50
  "lint-fix": "pnpm run build && eslint --fix .",
51
51
  "lint-fixtures": "pnpm --filter ./fixtures/vue3-ts-vite-starter-template lint",
@@ -70,8 +70,8 @@
70
70
  "url": "git+https://github.com/kouts/eslint-config.git"
71
71
  },
72
72
  "dependencies": {
73
- "@vitest/eslint-plugin": "^1.1.31",
74
- "eslint-config-prettier": "^10.0.1",
73
+ "@vitest/eslint-plugin": "^1.1.36",
74
+ "eslint-config-prettier": "^10.0.2",
75
75
  "eslint-plugin-html": "^8.1.2",
76
76
  "eslint-plugin-prettier": "^5.2.3",
77
77
  "eslint-plugin-simple-import-sort": "^12.1.1",
@@ -84,13 +84,14 @@
84
84
  "@commitlint/config-conventional": "^19.7.1",
85
85
  "@semantic-release/changelog": "^6.0.3",
86
86
  "@semantic-release/git": "^10.0.1",
87
- "@types/node": "^22.13.5",
87
+ "@types/node": "^22.13.8",
88
88
  "eslint": "^9.21.0",
89
89
  "husky": "^9.1.7",
90
90
  "lint-staged": "^15.4.3",
91
- "pkgroll": "^2.10.0",
91
+ "pkgroll": "^2.11.2",
92
92
  "semantic-release": "^24.2.3",
93
- "typescript": "^5.7.3"
93
+ "typescript": "5.7.3",
94
+ "vitest": "^3.0.7"
94
95
  },
95
96
  "peerDependencies": {
96
97
  "eslint": "^9.8.0"