@theahaco/ts-config 1.2.0 → 1.3.0
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/.github/workflows/release.yml +1 -1
- package/eslint.config.js +3 -19
- package/package.json +10 -12
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
|
-
|
|
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.
|
|
4
|
+
"version": "1.3.0",
|
|
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
|
-
"
|
|
38
|
-
"
|
|
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": "
|
|
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.
|
|
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": "^
|
|
67
|
-
"eslint-plugin-react-hooks": "^7.
|
|
68
|
-
"eslint-plugin-testing-library": "^7.
|
|
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.
|
|
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": "^
|
|
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",
|