From ca458dae04659d4cdcc6416106dac898f4a03005 Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 21 Feb 2025 05:47:01 +0800 Subject: [PATCH] eslint: add react-refresh rule --- framework/eslint-config/package.json | 1 + framework/eslint-config/react.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/framework/eslint-config/package.json b/framework/eslint-config/package.json index 64a2add01..a42bfe648 100644 --- a/framework/eslint-config/package.json +++ b/framework/eslint-config/package.json @@ -14,6 +14,7 @@ "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react": "^7.37.4", "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-react-refresh": "^0.4.19", "eslint-plugin-simple-import-sort": "^12.1.1" }, "peerDependencies": { diff --git a/framework/eslint-config/react.yaml b/framework/eslint-config/react.yaml index b11ad9b7f..390bd9d69 100644 --- a/framework/eslint-config/react.yaml +++ b/framework/eslint-config/react.yaml @@ -3,6 +3,7 @@ extends: - airbnb/hooks plugins: - react +- react-refresh - jsx-a11y rules: react-hooks/exhaustive-deps: 0 @@ -24,4 +25,5 @@ rules: jsx-a11y/anchor-is-valid: 0 jsx-a11y/click-events-have-key-events: 0 jsx-a11y/label-has-associated-control: 0 + react-refresh/only-export-components: ['warn', { allowConstantExport: true }] # 'react/no-unknown-property': ['error', { ignore: ['key'] }], \ No newline at end of file