Skip to content

Update dependency eslint-plugin-react-refresh to ^0.5.0 - #22

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/eslint-plugin-react-refresh-0.x
Open

Update dependency eslint-plugin-react-refresh to ^0.5.0#22
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/eslint-plugin-react-refresh-0.x

Conversation

@renovate

@renovate renovate Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
eslint-plugin-react-refresh ^0.4.19^0.5.0 age confidence

Release Notes

ArnaudBarre/eslint-plugin-react-refresh (eslint-plugin-react-refresh)

v0.5.0

Compare Source

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 reactRefresh export is available and prefered over the default export. It's an object with two properties:
    • plugin: The plugin object with the rules
    • configs: 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 extraHOCs
  • Validation of HOCs calls is now more strict, you may need to add some HOCs to the extraHOCs option

Config 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 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:

{
  "react-refresh/only-export-components": [
    "warn",
    { "extraHOCs": ["createRootRouteWithContext"] }
  ]
}

[!NOTE]
Actually createRoute functions from TanStack Router are not React HOCs, they return route objects that fake to be a memoized component but are not. When only doing createRootRoute({ component: Foo }), HMR will work fine, but as soon as you add a prop to the options that is not a React component, HMR will not work. I would recommend to avoid adding any TanStack function to extraHOCs it you want to preserve good HMR in the long term. Bluesky thread.

Because I'm not 100% sure this new logic doesn't introduce any false positive, this is done in a major-like version. This also give me the occasion to remove the hardcoded connect from the rule. If you are using connect from react-redux, you should now add it to extraHOCs like this:

{
  "react-refresh/only-export-components": ["warn", { "extraHOCs": ["connect"] }]
}

v0.4.26

Compare Source

v0.4.25

Compare Source

  • Report cases like export const ENUM = Object.keys(TABLE) as EnumType[]; (fixes #​93)
  • Allow _ in component names (#​94)

v0.4.24

Compare Source

  • Add "generateImageMetadata", "generateSitemaps" & "generateStaticParams" to allowExportNames in Next config

v0.4.23

Compare Source

  • Add "metadata", "generateMetadata" & "generateViewport" to allowExportNames in Next config

v0.4.22

Compare Source

  • Add "viewport" to allowExportNames in Next config (#​89)

v0.4.21

Compare Source

  • Add Next config (fixes #​85)

This allows exports like fetchCache and revalidate which are used in Page or Layout components and don't trigger a full page reload.

import reactRefresh from "eslint-plugin-react-refresh";

export default [
  /* Main config */
  reactRefresh.configs.next,
];

Configuration

📅 Schedule: Branch creation - "before 07:00 on Thursday" in timezone Europe/Oslo, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 15cab53 to db39765 Compare February 18, 2026 13:22
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from e0a3a77 to 3211de0 Compare March 8, 2026 07:14
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 3211de0 to 572e5d6 Compare March 14, 2026 08:13
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 572e5d6 to 18e76b3 Compare April 15, 2026 18:57
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 18e76b3 to cb1eee2 Compare May 1, 2026 11:05
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 2781b25 to 3d421cd Compare May 19, 2026 05:29
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 3b0b6a8 to 6dbad53 Compare June 1, 2026 14:09
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 6dbad53 to 9b0432d Compare June 12, 2026 07:53
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 9b0432d to 61e42b9 Compare June 21, 2026 03:16
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 61e42b9 to a9e4cf4 Compare July 18, 2026 03:38
@renovate
renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from a9e4cf4 to 515e8a0 Compare July 30, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants