Skip to content

Commit 2b65e5e

Browse files
committed
Next lint to eslint and Next 16
1 parent 2ee3868 commit 2b65e5e

File tree

17 files changed

+538
-191
lines changed

17 files changed

+538
-191
lines changed

.eslintrc.json

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

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ module.exports = {
55
printWidth: 100,
66
tabWidth: 2,
77
endOfLine: 'auto',
8+
plugins: ['prettier-plugin-tailwindcss', '@ianvs/prettier-plugin-sort-imports'],
9+
importOrder: [
10+
'<BUILTIN_MODULES>', // Node.js built-in modules
11+
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
12+
'^(@src)(/.*)$',
13+
'^[.]', // relative imports
14+
],
815
};

eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import nextVitals from 'eslint-config-next/core-web-vitals';
2+
import nextTs from 'eslint-config-next/typescript';
3+
import prettier from 'eslint-config-prettier/flat';
4+
import { defineConfig, globalIgnores } from 'eslint/config';
5+
6+
const eslintConfig = defineConfig([
7+
...nextVitals,
8+
...nextTs,
9+
prettier,
10+
// Override default ignores of eslint-config-next.
11+
globalIgnores([
12+
// Default ignores of eslint-config-next:
13+
'.next/**',
14+
'out/**',
15+
'build/**',
16+
'next-env.d.ts',
17+
]),
18+
]);
19+
20+
export default eslintConfig;

package.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,33 @@
77
"build": "next build",
88
"postbuild": "next-sitemap",
99
"start": "next start",
10-
"lint:check": "next lint",
11-
"lint": "next lint --fix",
10+
"lint:check": "eslint .",
11+
"lint": "eslint --fix .",
1212
"format": "prettier --write .",
1313
"format:check": "prettier --check ."
1414
},
1515
"dependencies": {
16-
"@next/third-parties": "^15.3.0",
17-
"next": "^15.3.0",
16+
"@next/third-parties": "16.0.1",
17+
"next": "16.0.1",
1818
"next-sitemap": "^4.2.3",
19-
"react": "^19.2.0",
20-
"react-dom": "^19.2.0",
19+
"react": "19.2.0",
20+
"react-dom": "19.2.0",
2121
"sharp": "^0.34.5"
2222
},
2323
"devDependencies": {
24+
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
2425
"@tailwindcss/postcss": "^4.1.17",
2526
"@types/node": "^22.14.0",
26-
"@types/react": "^19.2.2",
27-
"@types/react-dom": "^19.2.2",
27+
"@types/react": "19.2.2",
28+
"@types/react-dom": "19.2.2",
2829
"@typescript-eslint/eslint-plugin": "^8.46.3",
2930
"@typescript-eslint/parser": "^8.46.3",
3031
"eslint": "^9.39.1",
31-
"eslint-config-next": "^15.3.0",
32+
"eslint-config-next": "16.0.1",
3233
"eslint-config-prettier": "^10.1.1",
33-
"eslint-plugin-jsx-a11y": "^6.10.2",
34-
"eslint-plugin-react": "^7.37.5",
35-
"eslint-plugin-react-hooks": "^5.2.0",
36-
"eslint-plugin-simple-import-sort": "^12.1.1",
3734
"prettier": "^3.5.3",
35+
"prettier-plugin-tailwindcss": "^0.7.1",
3836
"tailwindcss": "^4.1.17",
39-
"typescript": "^5.9.3",
40-
"typescript-eslint": "^8.46.3"
37+
"typescript": "^5.9.3"
4138
}
4239
}

0 commit comments

Comments
 (0)