Skip to content

Commit 2d45399

Browse files
chore(deps): modernize deps & tooling (#6164)
1 parent 879d6bb commit 2d45399

File tree

6 files changed

+67
-69
lines changed

6 files changed

+67
-69
lines changed

.eslintrc

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

eslint.config.mjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import tseslint from 'typescript-eslint';
2+
import reactPlugin from 'eslint-plugin-react';
3+
import hooksPlugin from 'eslint-plugin-react-hooks';
4+
5+
export default tseslint.config(
6+
{
7+
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
8+
plugins: {
9+
react: reactPlugin,
10+
'react-hooks': hooksPlugin,
11+
},
12+
extends: [
13+
...tseslint.configs.recommended,
14+
...tseslint.configs.recommendedTypeChecked,
15+
...tseslint.configs.stylisticTypeChecked,
16+
],
17+
rules: {
18+
...reactPlugin.configs['jsx-runtime'].rules,
19+
...hooksPlugin.configs.recommended.rules,
20+
21+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
22+
'@typescript-eslint/consistent-type-definitions': 'off',
23+
'react/react-in-jsx-scope': 'off',
24+
'react/prop-types': 'off',
25+
'@typescript-eslint/no-unused-vars': [
26+
'error',
27+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
28+
],
29+
30+
// Consider removing these rule disables for more type safety in your app ✨
31+
'@typescript-eslint/no-confusing-void-expression': 'off',
32+
'@typescript-eslint/no-explicit-any': 'off',
33+
'@typescript-eslint/no-floating-promises': 'off',
34+
'@typescript-eslint/no-misused-promises': 'off',
35+
'@typescript-eslint/no-unsafe-assignment': 'off',
36+
'@typescript-eslint/no-unsafe-argument': 'off',
37+
'@typescript-eslint/no-unsafe-call': 'off',
38+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
39+
'@typescript-eslint/no-unsafe-return': 'off',
40+
'@typescript-eslint/no-unsafe-member-access': 'off',
41+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
42+
'@typescript-eslint/require-await': 'off',
43+
'@typescript-eslint/restrict-plus-operands': 'off',
44+
},
45+
},
46+
{
47+
linterOptions: { reportUnusedDisableDirectives: true },
48+
languageOptions: { parserOptions: { projectService: true } },
49+
},
50+
);
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import { NextConfig } from 'next';
2+
13
/**
24
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
35
*/
4-
5-
/** @type {import("next").NextConfig} */
6-
const config = {
6+
export default {
77
serverRuntimeConfig: {
88
// Will only be available on the server side
99
},
@@ -14,6 +14,4 @@ const config = {
1414
},
1515
/** We run eslint as a separate task in CI */
1616
eslint: { ignoreDuringBuilds: !!process.env.CI },
17-
};
18-
19-
module.exports = config;
17+
} satisfies NextConfig;

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"migrate": "prisma migrate deploy",
2424
"start": "cross-env NODE_ENV=production node dist/server/prodServer.js",
2525
"studio": "prisma studio",
26-
"lint": "eslint --cache --ext \".js,.ts,.tsx\" src",
26+
"lint": "eslint --cache src",
2727
"lint-fix": "pnpm lint --fix",
2828
"test-dev": "cross-env APP_ENV=test start-server-and-test dev 3000 test",
2929
"test-start": "cross-env APP_ENV=test WS_URL=ws://localhost:3000 start-server-and-test start 3000 test",
@@ -46,8 +46,8 @@
4646
"@trpc/react-query": "npm:@trpc/react-query@next",
4747
"@trpc/server": "npm:@trpc/server@next",
4848
"clsx": "^2.0.0",
49-
"next": "^14.2.5",
50-
"next-auth": "^4.22.1",
49+
"next": "^15.0.2",
50+
"next-auth": "npm:next-auth@4.22.1",
5151
"react": "^18.3.1",
5252
"react-dom": "^18.3.1",
5353
"superjson": "^1.12.4",
@@ -61,21 +61,20 @@
6161
"@types/node": "^20.10.0",
6262
"@types/react": "^18.3.1",
6363
"@types/ws": "^8.2.0",
64-
"@typescript-eslint/eslint-plugin": "^7.16.1",
65-
"@typescript-eslint/parser": "^7.16.1",
6664
"autoprefixer": "^10.4.7",
6765
"cross-env": "^7.0.3",
68-
"eslint": "^8.57.0",
69-
"eslint-config-next": "^14.2.5",
70-
"eslint-plugin-react": "^7.35.0",
71-
"eslint-plugin-react-hooks": "^4.6.2",
66+
"eslint": "^9.13.0",
67+
"eslint-config-next": "^15.0.2",
68+
"eslint-plugin-react": "^7.37.2",
69+
"eslint-plugin-react-hooks": "^5.0.0",
7270
"npm-run-all": "^4.1.5",
7371
"postcss": "^8.4.39",
74-
"prettier": "^2.8.8",
72+
"prettier": "^3.3.3",
7573
"prisma": "^5.12.1",
7674
"start-server-and-test": "^1.12.0",
7775
"tailwindcss": "^3.4.6",
78-
"typescript": "^5.6.2"
76+
"typescript": "^5.6.2",
77+
"typescript-eslint": "^8.12.2"
7978
},
8079
"publishConfig": {
8180
"access": "restricted"

src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ export default function IndexPage() {
250250
{isFetchingNextPage
251251
? 'Loading more...'
252252
: hasNextPage
253-
? 'Load More'
254-
: 'Nothing more to load'}
253+
? 'Load More'
254+
: 'Nothing more to load'}
255255
</button>
256256
<div className="space-y-4">
257257
{messages?.map((item) => (

src/server/routers/post.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const postRouter = router({
110110
let nextCursor: typeof cursor | null = null;
111111
if (items.length > take) {
112112
const prev = items.shift();
113-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
113+
114114
nextCursor = prev!.createdAt;
115115
}
116116
return {

0 commit comments

Comments
 (0)