Skip to content

Commit 90dcc3c

Browse files
refactor: update ESLint configuration and module exports
- Replaced eslint.config.mjs with eslint.config.js using defineConfig from eslint/config. - Updated package.json to reflect changes in ESLint configuration and
1 parent b2b00b1 commit 90dcc3c

File tree

8 files changed

+3761
-1936
lines changed

8 files changed

+3761
-1936
lines changed

eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig } from 'eslint/config'
2+
import tsPrefixer from 'eslint-config-ts-prefixer'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
5+
export default defineConfig([
6+
{
7+
ignores: [
8+
'**/.vscode',
9+
'**/node_modules',
10+
'**/build',
11+
'**/dist',
12+
'**/.github',
13+
'**/.idea',
14+
'public/mockServiceWorker.js',
15+
],
16+
},
17+
{
18+
plugins: {
19+
'react-hooks': reactHooks,
20+
},
21+
22+
rules: {
23+
'react-hooks/rules-of-hooks': 'error',
24+
},
25+
},
26+
...tsPrefixer,
27+
])

eslint.config.mjs

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

package.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
"name": "create-react-app-vite",
33
"version": "0.4.0",
44
"license": "MIT",
5+
"type": "module",
56
"msw": {
67
"workerDirectory": "public"
78
},
89
"lint-staged": {
9-
"*": "prettier --ignore-unknown --write"
10+
"*": "prettier --ignore-unknown --write",
11+
"*.{js,jsx,ts,tsx}": "eslint --fix"
1012
},
1113
"scripts": {
1214
"start": "vite",
1315
"dev": "vite",
1416
"build": "vite build",
1517
"preview": "vite preview",
16-
"test": "vitest --run",
18+
"test": "vitest run",
1719
"test:ui": "vitest --ui",
1820
"test:watch": "vitest",
19-
"lint": "eslint . -c eslint.config.mjs",
20-
"lint:fix": "eslint . -c eslint.config.mjs --fix",
21+
"lint": "eslint .",
22+
"lint:fix": "eslint . --fix",
2123
"typecheck": "tsc --noEmit",
2224
"prettier": "prettier --ignore-unknown --write .",
2325
"clean": "rimraf node_modules pnpm-lock.yaml dist",
@@ -32,34 +34,26 @@
3234
"react-router": "^7.6.2"
3335
},
3436
"devDependencies": {
35-
"@eslint/compat": "^1.3.0",
36-
"@eslint/eslintrc": "^3.3.1",
3737
"@eslint/js": "^9.29.0",
3838
"@tailwindcss/aspect-ratio": "^0.4.2",
3939
"@tailwindcss/forms": "^0.5.10",
40-
"@tailwindcss/line-clamp": "^0.4.4",
4140
"@tailwindcss/postcss": "^4.1.10",
4241
"@tailwindcss/typography": "^0.5.16",
4342
"@testing-library/dom": "^10.4.0",
4443
"@testing-library/jest-dom": "^6.6.3",
4544
"@testing-library/react": "^16.3.0",
4645
"@testing-library/user-event": "^14.6.1",
4746
"@types/eslint": "^9.6.1",
47+
"@types/node": "^24.0.4",
4848
"@types/react": "^19.1.8",
4949
"@types/react-dom": "^19.1.6",
50-
"@typescript-eslint/eslint-plugin": "^8.35.0",
51-
"@typescript-eslint/parser": "^8.35.0",
5250
"@vitejs/plugin-react-swc": "^3.10.2",
5351
"@vitest/ui": "^3.1.1",
5452
"all-contributors-cli": "^6.26.1",
5553
"concurrently": "^9.2.0",
5654
"cross-fetch": "^4.1.0",
5755
"eslint": "^9.29.0",
58-
"eslint-config-ts-prefixer": "^1.14.2",
59-
"eslint-import-resolver-typescript": "^4.4.3",
60-
"eslint-plugin-import": "^2.32.0",
61-
"eslint-plugin-jsx-a11y": "^6.10.2",
62-
"eslint-plugin-prettier": "^5.5.1",
56+
"eslint-config-ts-prefixer": "^3.0.3",
6357
"eslint-plugin-react-hooks": "^5.2.0",
6458
"husky": "^9.1.7",
6559
"jsdom": "^26.1.0",
@@ -87,6 +81,6 @@
8781
]
8882
},
8983
"volta": {
90-
"node": "22.16.0"
84+
"node": "22.17.0"
9185
}
9286
}

0 commit comments

Comments
 (0)