Skip to content

Commit

Permalink
improve: upgrade to eslint 9 (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt authored Apr 11, 2024
1 parent 4afa0ad commit c77de38
Show file tree
Hide file tree
Showing 30 changed files with 1,527 additions and 336 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import configPrisma from 'eslint-config-prisma'
import tsEslint from 'typescript-eslint'

export default tsEslint.config({
ignores: ['**/build/**/*', 'eslint.config.js'],
extends: configPrisma,
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
})
2 changes: 1 addition & 1 deletion examples/other-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const getAccessToken = () => Promise.resolve(`some special token here`)
const traceId = response.headers.get(`x-b3-trace-id`) || `unknown`
console.error(
`[${traceId}] Request error:
status ${response.status}
status ${String(response.status)}
details: ${response.errors.map((_) => _.message).join(`, `)}`,
)
}
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
"demo": "tsx src/cli/generate.ts && dprint fmt src/demo.ts",
"dev": "rm -rf dist && tsc --watch",
"format": "pnpm build:docs && dprint fmt",
"lint": "eslint . --ext .ts,.tsx --fix",
"lint": "eslint . --fix",
"check": "pnpm check:types && pnpm check:format && pnpm check:lint",
"check:types": "pnpm tsc --noEmit",
"check:format": "dprint check && pnpm build:docs && git diff --exit-code README.md",
"check:lint": "eslint . --ext .ts,.tsx --max-warnings 0",
"check:lint": "eslint . --max-warnings 0",
"prepublishOnly": "pnpm build",
"build:docs": "doctoc README.md --notitle && dprint fmt README.md",
"build": "pnpm clean && pnpm tsc --project tsconfig.build.json && chmod +x ./build/cli/generate.js",
Expand All @@ -82,7 +82,7 @@
"@dprint/typescript": "^0.90.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@molt/command": "^0.9.0",
"dprint": "^0.45.0",
"dprint": "^0.45.1",
"zod": "^3.22.4"
},
"peerDependencies": {
Expand All @@ -93,29 +93,31 @@
"@types/body-parser": "^1.19.5",
"@types/express": "^4.17.21",
"@types/json-bigint": "^1.0.4",
"@types/node": "^20.12.3",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"apollo-server-express": "^3.13.0",
"body-parser": "^1.20.2",
"doctoc": "^2.2.1",
"dripip": "^0.10.0",
"eslint": "^8.57.0",
"eslint-config-prisma": "^0.2.0",
"eslint": "^9.0.0",
"eslint-config-prisma": "^0.6.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"eslint-typescript": "^1.1.0",
"express": "^4.19.2",
"get-port": "^7.1.0",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"happy-dom": "^14.3.10",
"happy-dom": "^14.7.1",
"json-bigint": "^1.0.0",
"tsx": "^4.7.1",
"tsx": "^4.7.2",
"type-fest": "^4.15.0",
"typescript": "^5.4.3",
"typescript": "^5.4.5",
"typescript-eslint": "^7.6.0",
"vitest": "^1.4.0"
}
}
Loading

0 comments on commit c77de38

Please sign in to comment.