Skip to content

Commit 42ca976

Browse files
authored
docs: update ESLint configuration in vite-react-dom-js-with-babel-eslint-parser-app example (#1085)
1 parent f383e81 commit 42ca976

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

examples/vite-react-dom-js-with-babel-eslint-parser-app/eslint.config.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import eslintJs from "@eslint/js";
2-
import eslintReact from "@eslint-react/eslint-plugin";
2+
import eslintPluginReactX from "eslint-plugin-react-x";
3+
import eslintPluginReactDom from "eslint-plugin-react-dom";
4+
import eslintPluginReactWebApi from "eslint-plugin-react-web-api";
35
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
6+
import eslintPluginReactHooksExtra from "eslint-plugin-react-hooks-extra";
7+
import eslintPluginReactNamingConvention from "eslint-plugin-react-naming-convention";
48
import eslintPluginReactRefresh from "eslint-plugin-react-refresh";
9+
import eslintPluginReactDebug from "eslint-plugin-react-debug";
510
import babelEslintParser from "@babel/eslint-parser";
611
import globals from "globals";
712
import { defineConfig } from "eslint/config";
@@ -33,7 +38,9 @@ export default defineConfig([
3338
{
3439
files: JSCONFIG_NODE.include,
3540
ignores: JSCONFIG_NODE.exclude,
36-
extends: [eslintJs.configs.recommended],
41+
extends: [
42+
eslintJs.configs.recommended,
43+
],
3744
languageOptions: {
3845
globals: {
3946
...globals.node,
@@ -56,8 +63,13 @@ export default defineConfig([
5663
{
5764
files: JSCONFIG_APP.include,
5865
extends: [
59-
eslintReact.configs.recommended,
66+
eslintPluginReactX.configs.recommended,
67+
eslintPluginReactDom.configs.recommended,
68+
eslintPluginReactWebApi.configs.recommended,
69+
eslintPluginReactHooksExtra.configs.recommended,
70+
eslintPluginReactNamingConvention.configs.recommended,
6071
eslintPluginReactRefresh.configs.recommended,
72+
eslintPluginReactDebug.configs.all,
6173
],
6274
plugins: {
6375
"react-hooks": eslintPluginReactHooks,

examples/vite-react-dom-js-with-babel-eslint-parser-app/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"@babel/eslint-parser": "^7.27.0",
2020
"@babel/preset-env": "^7.26.9",
2121
"@babel/preset-react": "^7.26.3",
22-
"@eslint-react/eslint-plugin": "workspace:*",
2322
"@eslint/config-inspector": "^1.0.2",
2423
"@eslint/js": "^9.24.0",
2524
"@types/babel__core": "~7.20.5",
@@ -28,8 +27,14 @@
2827
"@types/react-dom": "^19.1.2",
2928
"@vitejs/plugin-react": "^4.4.0",
3029
"eslint": "^9.24.0",
30+
"eslint-plugin-react-debug": "workspace:*",
31+
"eslint-plugin-react-dom": "workspace:*",
3132
"eslint-plugin-react-hooks": "^5.2.0",
33+
"eslint-plugin-react-hooks-extra": "workspace:*",
34+
"eslint-plugin-react-naming-convention": "workspace:*",
3235
"eslint-plugin-react-refresh": "^0.4.19",
36+
"eslint-plugin-react-web-api": "workspace:*",
37+
"eslint-plugin-react-x": "workspace:*",
3338
"globals": "^16.0.0",
3439
"vite": "^6.3.0"
3540
},

pnpm-lock.yaml

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)