Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c1d3d7e

Browse files
chore(deps-dev): update eslint to v9.17 (react-hook-form#1106)
1 parent 8d97b6b commit c1d3d7e

File tree

4 files changed

+824
-830
lines changed

4 files changed

+824
-830
lines changed

‎.eslintrc.js

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

‎eslint.config.mjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// @ts-check
2+
import tseslint from "typescript-eslint"
3+
import { FlatCompat } from "@eslint/eslintrc"
4+
import eslintPluginJsxA11y from "eslint-plugin-jsx-a11y"
5+
import eslintPluginReact from "eslint-plugin-react"
6+
7+
const compat = new FlatCompat({
8+
baseDirectory: import.meta.dirname,
9+
})
10+
11+
export default tseslint.config(
12+
tseslint.configs.recommended,
13+
...compat.config({
14+
extends: ["next"],
15+
rules: {
16+
// react
17+
"react/prop-types": "off",
18+
"react/no-unescaped-entities": "off",
19+
"react/jsx-curly-brace-presence": "warn",
20+
21+
// jsx-ally is already included in next-js so
22+
// we are adding only recommended rules directly here
23+
...eslintPluginJsxA11y.flatConfigs.recommended.rules,
24+
"jsx-a11y/no-onchange": "warn",
25+
26+
// import
27+
"import/no-anonymous-default-export": "off",
28+
29+
// next
30+
"@next/next/no-img-element": "off",
31+
},
32+
}),
33+
// @ts-expect-error eslintPluginReact.configs.flat, but runtime is always defined
34+
eslintPluginReact.configs.flat["jsx-runtime"],
35+
{
36+
linterOptions: {
37+
reportUnusedDisableDirectives: "error",
38+
},
39+
rules: {
40+
// typescript
41+
"@typescript-eslint/explicit-function-return-type": "off",
42+
"@typescript-eslint/interface-name-prefix": "off",
43+
"@typescript-eslint/explicit-module-boundary-types": "off",
44+
},
45+
}
46+
)

‎package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
"@mdx-js/loader": "^2.3.0",
99
"@mdx-js/react": "^2.3.0",
1010
"@next/mdx": "15.1.0",
11-
"@types/node": "^20.3.1",
1211
"class-variance-authority": "^0.6.0",
1312
"clsx": "^1.2.1",
1413
"contentlayer": "^0.3.4",
15-
"date-fns": "^2.30.0",
1614
"little-state-machine": "^4.8.0",
1715
"next": "15.1.0",
1816
"next-contentlayer": "^0.3.4",
@@ -34,22 +32,23 @@
3432
},
3533
"devDependencies": {
3634
"@next/bundle-analyzer": "15.1.0",
35+
"@types/eslint-plugin-jsx-a11y": "6.10.0",
36+
"@types/eslint__eslintrc": "2.1.2",
37+
"@types/node": "20.17.10",
3738
"@types/react": "^18.3.17",
3839
"@types/react-dom": "^18.3.5",
3940
"@types/react-helmet": "^6.1.6",
40-
"@typescript-eslint/eslint-plugin": "^8.18.0",
41-
"@typescript-eslint/parser": "^8.18.0",
4241
"cross-env": "^7.0.3",
43-
"eslint": "^8.57.1",
42+
"eslint": "9.17.0",
4443
"eslint-config-next": "15.1.0",
45-
"eslint-config-prettier": "^8.8.0",
46-
"eslint-plugin-jsx-a11y": "^6.7.1",
47-
"eslint-plugin-react": "^7.32.2",
48-
"eslint-plugin-react-hooks": "^4.6.0",
44+
"eslint-plugin-jsx-a11y": "6.10.2",
45+
"eslint-plugin-react": "7.37.2",
46+
"eslint-plugin-react-hooks": "5.1.0",
4947
"husky": "^8.0.3",
5048
"lint-staged": "^13.2.2",
5149
"prettier": "^3.4.2",
52-
"typescript": "^5.6.3"
50+
"typescript": "^5.6.3",
51+
"typescript-eslint": "8.18.1"
5352
},
5453
"keywords": [
5554
"react-hook-form",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /