This plugin provides a single rule, react-refresh/only-export-components. There are multiple ways to enable it.Recommended configimport reactRefresh from "eslint-plugin-react-refresh"; export default [ /* Main
Validate that your components can safely be updated with Fast Refresh - eslint-plugin-react-refresh/src/only-export-components.test.ts at main · ArnaudBarre/eslint-plugin-react-refresh
If you update some React component(s) on disk, then the bundler will know to update only the impacted parts of your page -- without a full page reload. eslint-plugin-react-refresh enforces that your components are structured in a way that integrations such as react-refresh expect. ...
importreactRefreshfrom"eslint-plugin-react-refresh";exportdefault[/* Main config */reactRefresh.configs.vite, ]; Without config importreactRefreshfrom"eslint-plugin-react-refresh";exportdefault[ {// in main config for TSX/JSX source filesplugins: {"react-refresh": reactRefresh, },rules: {"rea...
qdrawmentioned this on Sep 14, 2024 [Snyk] Upgrade: , , core-js, eslint-plugin-react-refresh, react-router-dom, ts-jest, vite qdraw/starsky#1717 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment ...
Validate that your components can safely be updated with Fast Refresh - Release v0.4.12 · ArnaudBarre/eslint-plugin-react-refresh
{"plugins": ["react-refresh"],"rules": {"react-refresh/only-export-components":"warn"} } Flat config importreactRefreshfrom"eslint-plugin-react-refresh";exportdefault[{// in main config for TSX/JSX source filesplugins:{"react-refresh":reactRefresh,},rules:{"react-refresh/only-export-compo...