Skip to content

Commit c77de38

Browse files
authored
improve: upgrade to eslint 9 (#764)
1 parent 4afa0ad commit c77de38

30 files changed

+1527
-336
lines changed

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

eslint.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import configPrisma from 'eslint-config-prisma'
2+
import tsEslint from 'typescript-eslint'
3+
4+
export default tsEslint.config({
5+
ignores: ['**/build/**/*', 'eslint.config.js'],
6+
extends: configPrisma,
7+
languageOptions: {
8+
parserOptions: {
9+
project: true,
10+
tsconfigRootDir: import.meta.dirname,
11+
},
12+
},
13+
})

examples/other-middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const getAccessToken = () => Promise.resolve(`some special token here`)
5151
const traceId = response.headers.get(`x-b3-trace-id`) || `unknown`
5252
console.error(
5353
`[${traceId}] Request error:
54-
status ${response.status}
54+
status ${String(response.status)}
5555
details: ${response.errors.map((_) => _.message).join(`, `)}`,
5656
)
5757
}

package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
"demo": "tsx src/cli/generate.ts && dprint fmt src/demo.ts",
6262
"dev": "rm -rf dist && tsc --watch",
6363
"format": "pnpm build:docs && dprint fmt",
64-
"lint": "eslint . --ext .ts,.tsx --fix",
64+
"lint": "eslint . --fix",
6565
"check": "pnpm check:types && pnpm check:format && pnpm check:lint",
6666
"check:types": "pnpm tsc --noEmit",
6767
"check:format": "dprint check && pnpm build:docs && git diff --exit-code README.md",
68-
"check:lint": "eslint . --ext .ts,.tsx --max-warnings 0",
68+
"check:lint": "eslint . --max-warnings 0",
6969
"prepublishOnly": "pnpm build",
7070
"build:docs": "doctoc README.md --notitle && dprint fmt README.md",
7171
"build": "pnpm clean && pnpm tsc --project tsconfig.build.json && chmod +x ./build/cli/generate.js",
@@ -82,7 +82,7 @@
8282
"@dprint/typescript": "^0.90.0",
8383
"@graphql-typed-document-node/core": "^3.2.0",
8484
"@molt/command": "^0.9.0",
85-
"dprint": "^0.45.0",
85+
"dprint": "^0.45.1",
8686
"zod": "^3.22.4"
8787
},
8888
"peerDependencies": {
@@ -93,29 +93,31 @@
9393
"@types/body-parser": "^1.19.5",
9494
"@types/express": "^4.17.21",
9595
"@types/json-bigint": "^1.0.4",
96-
"@types/node": "^20.12.3",
97-
"@typescript-eslint/eslint-plugin": "^7.5.0",
98-
"@typescript-eslint/parser": "^7.5.0",
96+
"@types/node": "^20.12.7",
97+
"@typescript-eslint/eslint-plugin": "^7.6.0",
98+
"@typescript-eslint/parser": "^7.6.0",
9999
"apollo-server-express": "^3.13.0",
100100
"body-parser": "^1.20.2",
101101
"doctoc": "^2.2.1",
102102
"dripip": "^0.10.0",
103-
"eslint": "^8.57.0",
104-
"eslint-config-prisma": "^0.2.0",
103+
"eslint": "^9.0.0",
104+
"eslint-config-prisma": "^0.6.0",
105105
"eslint-plugin-deprecation": "^2.0.0",
106106
"eslint-plugin-only-warn": "^1.1.0",
107107
"eslint-plugin-prefer-arrow": "^1.2.3",
108108
"eslint-plugin-simple-import-sort": "^12.0.0",
109109
"eslint-plugin-tsdoc": "^0.2.17",
110+
"eslint-typescript": "^1.1.0",
110111
"express": "^4.19.2",
111112
"get-port": "^7.1.0",
112113
"graphql": "^16.8.1",
113114
"graphql-tag": "^2.12.6",
114-
"happy-dom": "^14.3.10",
115+
"happy-dom": "^14.7.1",
115116
"json-bigint": "^1.0.0",
116-
"tsx": "^4.7.1",
117+
"tsx": "^4.7.2",
117118
"type-fest": "^4.15.0",
118-
"typescript": "^5.4.3",
119+
"typescript": "^5.4.5",
120+
"typescript-eslint": "^7.6.0",
119121
"vitest": "^1.4.0"
120122
}
121123
}

0 commit comments

Comments
 (0)