From 800bc95cb7c77ae1d2a9e4868e77c910033f6f40 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 Mar 2026 10:59:48 +0000
Subject: [PATCH] chore(deps-dev): Bump eslint-plugin-react-refresh from 0.4.26
to 0.5.0 (#1669)
Bumps
[eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh)
from 0.4.26 to 0.5.0.
Sourced from eslint-plugin-react-refresh's
releases. Config example: export default defineConfig(
/* Main config */
reactRefresh.configs.vite({ extraHOCs: ["someLibHOC"] }),
);
Release notes
v0.5.0
Breaking changes
reactRefresh export is available and prefered
over the default export. It's an object with two properties:
plugin: The plugin object with the rulesconfigs: An object containing configuration presets,
each exposed as a function. These functions accept your custom options,
merge them with sensible defaults for that config, and return the final
config object.customHOCs option was renamed to
extraHOCsextraHOCs optionimport { defineConfig } from
"eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
Config example without config:
import { defineConfig } from
"eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
export default defineConfig({
files: ["/*.ts", "/*.tsx"],
plugins: {
// other plugins
"react-refresh": reactRefresh.plugin,
},
rules: {
// other rules
"react-refresh/only-export-components": [
"warn",
{ extraHOCs: ["someLibHOC"] },
],
},
});
This version follows a revamp of the internal logic to better make
the difference between random call expressions like export const
Enum = Object.keys(Record) and actual React HOC calls like
export const MemoComponent = memo(Component). (fixes #93)
The rule now handles ternaries and patterns like export default
customHOC(props)(Component) which makes it able to correctly
support files like this
one given this config:
... (truncated)
Sourced from eslint-plugin-react-refresh's changelog.
0.5.0
Breaking changes
- The package now ships as ESM and requires ESLint 9 + node 20. Because legacy config doesn't support ESM, this requires to use flat config
- A new
reactRefreshexport is available and prefered over the default export. It's an object with two properties:
plugin: The plugin object with the rulesconfigs: An object containing configuration presets, each exposed as a function. These functions accept your custom options, merge them with sensible defaults for that config, and return the final config object.customHOCsoption was renamed toextraHOCs- Validation of HOCs calls is now more strict, you may need to add some HOCs to the
extraHOCsoptionConfig example:
import { defineConfig } from "eslint/config"; import { reactRefresh } from "eslint-plugin-react-refresh";export default defineConfig( /* Main config */ reactRefresh.configs.vite({ extraHOCs: ["someLibHOC"] }), );
Config example without config:
import { defineConfig } from "eslint/config"; import { reactRefresh } from "eslint-plugin-react-refresh";export default defineConfig({ files: ["/*.ts", "/*.tsx"], plugins: { // other plugins "react-refresh": reactRefresh.plugin, }, rules: { // other rules "react-refresh/only-export-components": [ "warn", { extraHOCs: ["someLibHOC"] }, ], }, });
Why
This version follows a revamp of the internal logic to better make the difference between random call expressions like
export const Enum = Object.keys(Record)and actual React HOC calls likeexport const MemoComponent = memo(Component). (fixes #93)The rule now handles ternaries and patterns like
export default customHOC(props)(Component)which makes it able to correctly support files like this one given this config:
... (truncated)
daa2efb
Revamp logic to catch more cases [publish] (#97)