Skip to content

Commit 8563a76

Browse files
chore: Eslint Update (#572)
1 parent ca2f8a1 commit 8563a76

File tree

12 files changed

+6398
-7835
lines changed

12 files changed

+6398
-7835
lines changed

.eslintrc

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

eslint.config.mjs

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import js from '@eslint/js'
2+
import * as tseslint from 'typescript-eslint'
3+
import react from 'eslint-plugin-react'
4+
import reactHooks from 'eslint-plugin-react-hooks'
5+
import jsxA11y from 'eslint-plugin-jsx-a11y'
6+
import path from 'node:path'
7+
import { fileURLToPath } from 'node:url'
8+
9+
const __filename = fileURLToPath(import.meta.url)
10+
const __dirname = path.dirname(__filename)
11+
12+
const ignores = [
13+
'node_modules',
14+
'dist',
15+
'build',
16+
'.content-collections',
17+
'.tanstack-start',
18+
'.netlify',
19+
'public',
20+
'convex/.temp',
21+
]
22+
23+
export default [
24+
{ ignores },
25+
{
26+
files: ['**/*.{js,jsx}'],
27+
...js.configs.recommended,
28+
},
29+
...tseslint.configs.recommended,
30+
{
31+
files: ['**/*.{ts,tsx}'],
32+
languageOptions: {
33+
parserOptions: {
34+
tsconfigRootDir: __dirname,
35+
},
36+
},
37+
rules: {
38+
'@typescript-eslint/no-unused-vars': [
39+
'warn',
40+
{
41+
argsIgnorePattern: '(^_)|(^__+$)|(^e$)|(^error$)',
42+
varsIgnorePattern: '(^_)|(^__+$)|(^e$)|(^error$)',
43+
caughtErrorsIgnorePattern: '(^_)|(^__+$)|(^e$)|(^error$)',
44+
},
45+
],
46+
'no-redeclare': 'off',
47+
'@typescript-eslint/no-redeclare': 'error',
48+
'no-shadow': 'off',
49+
'@typescript-eslint/no-explicit-any': 'off',
50+
},
51+
},
52+
{
53+
files: ['**/*.{ts,tsx,js,jsx}'],
54+
plugins: {
55+
react,
56+
'react-hooks': reactHooks,
57+
'jsx-a11y': jsxA11y,
58+
},
59+
settings: {
60+
react: { version: 'detect' },
61+
},
62+
rules: {
63+
...reactHooks.configs.recommended.rules,
64+
...jsxA11y.configs.recommended.rules,
65+
},
66+
},
67+
]

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"@tanstack/react-start": "1.139.12",
5050
"@tanstack/react-table": "^8.21.3",
5151
"@types/d3": "^7.4.3",
52-
"@typescript-eslint/parser": "^7.2.0",
5352
"@visx/hierarchy": "^2.10.0",
5453
"@visx/responsive": "^2.10.0",
5554
"@vitejs/plugin-react": "^4.3.3",
@@ -62,12 +61,11 @@
6261
"date-fns": "^2.30.0",
6362
"downshift": "^9.0.9",
6463
"drizzle-orm": "^0.44.7",
65-
"eslint-config-react-app": "^7.0.1",
64+
"eslint-plugin-jsx-a11y": "^6.10.2",
6665
"gray-matter": "^4.0.3",
6766
"hast-util-is-element": "^3.0.0",
6867
"hast-util-to-string": "^3.0.1",
6968
"html-react-parser": "^5.1.10",
70-
"import-meta-resolve": "^4.0.0",
7169
"lru-cache": "^7.13.1",
7270
"mermaid": "^11.11.0",
7371
"postgres": "^3.4.7",
@@ -102,6 +100,7 @@
102100
"devDependencies": {
103101
"@content-collections/core": "^0.8.2",
104102
"@content-collections/vite": "^0.2.4",
103+
"@eslint/js": "^9.39.1",
105104
"@shikijs/transformers": "^1.10.3",
106105
"@types/node": "^24.3.0",
107106
"@types/pg": "^8.15.6",
@@ -111,14 +110,17 @@
111110
"autoprefixer": "^10.4.18",
112111
"dotenv-cli": "^8.0.0",
113112
"drizzle-kit": "^0.31.7",
114-
"eslint": "^8.57.0",
115-
"eslint-plugin-unicorn": "^49.0.0",
113+
"eslint": "^9.39.1",
114+
"eslint-plugin-jsx-a11y": "^6.10.0",
115+
"eslint-plugin-react": "^7.37.5",
116+
"eslint-plugin-react-hooks": "^7.0.1",
116117
"npm-run-all": "^4.1.5",
117118
"postcss": "^8.4.35",
118119
"prettier": "^3.7.4",
119120
"tailwindcss": "^4.1.11",
120121
"tsx": "^4.21.0",
121122
"typescript": "^5.6.3",
123+
"typescript-eslint": "^8.48.1",
122124
"vite": "^7.0.0"
123125
},
124126
"engines": {

0 commit comments

Comments
 (0)