@theahaco/ts-config 1.2.0 → 1.3.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.
@@ -34,7 +34,7 @@ jobs:
34
34
  useLockFile: false # better for libraries
35
35
 
36
36
  - name: 🔍 Validate
37
- run: npm run validate
37
+ run: npm run prepack
38
38
 
39
39
  release:
40
40
  name: 🚀 Release
package/eslint.config.js CHANGED
@@ -19,7 +19,6 @@ const hasReact = has("react")
19
19
  const hasTypeScript = has("typescript")
20
20
  const hasVitest = has("vitest")
21
21
  const hasTestingLibrary = has("@testing-library/dom")
22
- const hasJestDom = has("@testing-library/jest-dom")
23
22
  const hasPlaywright = has("playwright")
24
23
 
25
24
  const testFiles = ["**/tests/**", "**/*.test.*"]
@@ -85,7 +84,7 @@ export const config = defineConfig(
85
84
  ? {
86
85
  files: ["**/*.tsx", "**/*.jsx"],
87
86
  plugins: {
88
- react: (await import("eslint-plugin-react")).default,
87
+ "react-x": (await import("eslint-plugin-react-x")).default,
89
88
  },
90
89
  languageOptions: {
91
90
  parser: hasTypeScript
@@ -96,7 +95,8 @@ export const config = defineConfig(
96
95
  },
97
96
  },
98
97
  rules: {
99
- "react/jsx-key": WARN,
98
+ // successor to eslint-plugin-react's `react/jsx-key`
99
+ "react-x/no-missing-key": WARN,
100
100
  },
101
101
  }
102
102
  : null,
@@ -274,22 +274,6 @@ export const config = defineConfig(
274
274
  }
275
275
  : null,
276
276
 
277
- hasJestDom
278
- ? {
279
- files: testFiles,
280
- ignores: [...playwrightFiles],
281
- plugins: {
282
- "jest-dom": (await import("eslint-plugin-jest-dom")).default,
283
- },
284
- rules: {
285
- "jest-dom/prefer-checked": ERROR,
286
- "jest-dom/prefer-enabled-disabled": ERROR,
287
- "jest-dom/prefer-focus": ERROR,
288
- "jest-dom/prefer-required": ERROR,
289
- },
290
- }
291
- : null,
292
-
293
277
  hasVitest
294
278
  ? {
295
279
  files: testFiles,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@theahaco/ts-config",
4
- "version": "1.2.0",
4
+ "version": "1.3.1",
5
5
  "description": "Standardized configs for The Aha Co TS/JS projects",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
@@ -34,9 +34,8 @@
34
34
  "scripts": {
35
35
  "format": "prettier . --write",
36
36
  "lint": "eslint .",
37
- "typecheck": "tsc",
38
- "validate": "run-p -l format lint typecheck",
39
- "prepack": "npm run validate"
37
+ "prepack": "run-p -l format lint typecheck",
38
+ "typecheck": "tsc"
40
39
  },
41
40
  "keywords": [
42
41
  "config",
@@ -56,25 +55,24 @@
56
55
  "url": "git+https://github.com/theahaco/ts-config.git"
57
56
  },
58
57
  "homepage": "https://github.com/theahaco/ts-config",
59
- "license": "MIT",
58
+ "license": "Apache-2.0",
60
59
  "dependencies": {
61
60
  "@total-typescript/ts-reset": "^0.6.1",
62
61
  "@vitest/eslint-plugin": "^1.3.4",
63
- "eslint-plugin-import-x": "^4.16.1",
64
- "eslint-plugin-jest-dom": "^5.5.0",
62
+ "eslint-plugin-import-x": "^4.16.2",
65
63
  "eslint-plugin-playwright": "^2.2.0",
66
- "eslint-plugin-react": "^7.37.5",
67
- "eslint-plugin-react-hooks": "^7.0.0",
68
- "eslint-plugin-testing-library": "^7.6.1",
64
+ "eslint-plugin-react-x": "^5.8.19",
65
+ "eslint-plugin-react-hooks": "^7.1.1",
66
+ "eslint-plugin-testing-library": "^7.16.2",
69
67
  "globals": "^17.0.0",
70
68
  "tslib": "^2.8.1",
71
- "typescript-eslint": "^8.38.0"
69
+ "typescript-eslint": "^8.61.0"
72
70
  },
73
71
  "devDependencies": {
74
72
  "@playwright/test": "^1.54.1",
75
73
  "@types/eslint": "^9.6.1",
76
74
  "@types/react": "^19.1.8",
77
- "eslint": "^9.32.0",
75
+ "eslint": "^10.0.0",
78
76
  "npm-run-all": "^4.1.5",
79
77
  "prettier": "^3.6.2",
80
78
  "react": "^19.1.0",
package/prettier.js CHANGED
@@ -22,7 +22,7 @@ export const config = {
22
22
  // formatting the package.json with anything other than spaces will cause
23
23
  // issues when running install...
24
24
  {
25
- files: ["**/package.json"],
25
+ files: ["**/package.json", "**/package-lock.json"],
26
26
  options: {
27
27
  useTabs: false,
28
28
  },