Skip to content

Commit c438b75

Browse files
feat(eslint): upgrade to eslint v9, typescript-eslint v8 (#155)
1 parent 26dc2db commit c438b75

File tree

4 files changed

+243
-329
lines changed

4 files changed

+243
-329
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"cipublishforce": "CI=true pnpm cipublish"
2424
},
2525
"devDependencies": {
26-
"@types/node": "^20.14.10",
27-
"jsdom": "^24.1.3",
26+
"@types/node": "^20.16.2",
27+
"jsdom": "^25.0.0",
2828
"nx": "^19.6.4",
2929
"prettier": "^3.3.3",
3030
"publint": "^0.2.10",

packages/config/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
},
6161
"dependencies": {
6262
"@commitlint/parse": "^19.0.3",
63-
"@eslint/js": "^8.57.0",
63+
"@eslint/js": "^9.9.1",
6464
"@stylistic/eslint-plugin-js": "^2.7.1",
6565
"commander": "^12.1.0",
6666
"current-git-branch": "^1.1.0",
6767
"esbuild-register": "^3.6.0",
68-
"eslint-plugin-import-x": "^3.1.0",
68+
"eslint-plugin-import-x": "^4.1.1",
6969
"eslint-plugin-n": "^17.10.2",
7070
"globals": "^15.9.0",
7171
"interpret": "^3.1.1",
@@ -78,22 +78,22 @@
7878
"typedoc": "^0.26.6",
7979
"typedoc-plugin-frontmatter": "^1.0.0",
8080
"typedoc-plugin-markdown": "^4.2.6",
81-
"typescript-eslint": "^7.18.0",
81+
"typescript-eslint": "^8.3.0",
8282
"v8flags": "^4.0.1",
8383
"vite-plugin-dts": "^4.0.3",
8484
"vite-plugin-externalize-deps": "^0.8.0",
8585
"vite-tsconfig-paths": "^5.0.1"
8686
},
8787
"devDependencies": {
8888
"@types/current-git-branch": "^1.1.6",
89-
"@types/eslint": "^8.56.12",
89+
"@types/eslint": "^9.6.1",
9090
"@types/interpret": "^1.1.3",
9191
"@types/jsonfile": "^6.1.4",
9292
"@types/liftoff": "^4.0.3",
9393
"@types/minimist": "^1.2.5",
9494
"@types/semver": "^7.5.8",
9595
"@types/v8flags": "^3.1.3",
96-
"eslint": "^8.57.0",
96+
"eslint": "^9.9.1",
9797
"type-fest": "^4.26.0"
9898
}
9999
}

packages/config/src/eslint/typescript.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export const typescriptRules = {
1515
'ts-ignore': 'allow-with-description',
1616
},
1717
],
18-
/** Bans problematic built-in types and suggests alternatives */
19-
'@typescript-eslint/ban-types': 'error',
2018
/** Enforce import type { T } */
2119
'@typescript-eslint/consistent-type-imports': [
2220
'error',
@@ -44,6 +42,11 @@ export const typescriptRules = {
4442
'@typescript-eslint/no-extra-non-null-assertion': 'error',
4543
/** There are several potential bugs with this compared to other loops */
4644
'@typescript-eslint/no-for-in-array': 'error',
45+
/** Don't over-define types for simple things like strings */
46+
'@typescript-eslint/no-inferrable-types': [
47+
'error',
48+
{ ignoreParameters: true },
49+
],
4750
/** Enforce valid definition of new and constructor */
4851
'@typescript-eslint/no-misused-new': 'error',
4952
/** Disallow TypeScript namespaces */
@@ -54,11 +57,10 @@ export const typescriptRules = {
5457
'@typescript-eslint/no-unnecessary-condition': 'error',
5558
/** Checks if the the explicit type is identical to the inferred type */
5659
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
57-
/** Don't over-define types for simple things like strings */
58-
'@typescript-eslint/no-inferrable-types': [
59-
'error',
60-
{ ignoreParameters: true },
61-
],
60+
/** Disallow using the unsafe built-in Function type */
61+
'@typescript-eslint/no-unsafe-function-type': 'error',
62+
/** Disallow using confusing built-in primitive class wrappers */
63+
'@typescript-eslint/no-wrapper-object-types': 'error',
6264
/** Enforce the use of as const over literal type */
6365
'@typescript-eslint/prefer-as-const': 'error',
6466
/** Prefer for-of loop over the standard for loop */

0 commit comments

Comments
 (0)