Skip to content

Commit 4aeb529

Browse files
committed
chore(web): add eslint-plugin-react-refresh
1 parent 5ff6799 commit 4aeb529

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

eslint.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import js from "@eslint/js";
33
import ts from "@typescript-eslint/eslint-plugin";
44
import tsParser from "@typescript-eslint/parser";
55
import react from "eslint-plugin-react";
6+
import reactRefresh from "eslint-plugin-react-refresh";
67
import reactHooks from "eslint-plugin-react-hooks";
78
import unicorn from "eslint-plugin-unicorn";
89

@@ -84,6 +85,7 @@ export default [
8485
files: ["webdriver-ts-results/**/*.tsx"],
8586
plugins: {
8687
react,
88+
"react-refresh": reactRefresh,
8789
"react-hooks": reactHooks,
8890
},
8991
rules: {
@@ -92,6 +94,7 @@ export default [
9294
...reactHooks.configs.recommended.rules,
9395

9496
"react/jsx-no-useless-fragment": "warn",
97+
"react-refresh/only-export-components": "warn",
9598
},
9699
settings: { react: { version: "detect" } },
97100
languageOptions: { globals: { ...globals.browser } },
@@ -101,7 +104,7 @@ export default [
101104
languageOptions: { globals: { ...globals.browser, ...globals.node } },
102105
rules: {
103106
"@typescript-eslint/no-loss-of-precision": "off",
104-
"no-debugger":"off"
107+
"no-debugger": "off",
105108
},
106109
},
107110
];

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"eslint": "^8.52.0",
5959
"eslint-plugin-react": "^7.33.2",
6060
"eslint-plugin-react-hooks": "^4.6.0",
61+
"eslint-plugin-react-refresh": "^0.4.5",
6162
"eslint-plugin-unicorn": "^49.0.0",
6263
"globals": "^13.23.0",
6364
"local-web-server": "^5.3.0",

0 commit comments

Comments
 (0)