Skip to content

chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.2#77

Closed
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/dev-deps-minor
Closed

chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.2#77
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/dev-deps-minor

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Feb 4, 2026

This PR contains the following updates:

Package Change Age Confidence
eslint-plugin-react-refresh ^0.4.20^0.5.2 age confidence

Release Notes

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

v0.5.2

Compare Source

  • Support nested function calls for extraHOCs (actually fixes #​104)

v0.5.1

Compare Source

  • Mark ESLint v10 as supported
  • Support false positives with TypeScript function overloading (fixes #​105)
  • Support nested function calls for extraHOCs (fixes #​104)

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 - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Asia/Kolkata.

🚦 Automerge: Enabled.

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 added the dependencies Pull requests that update a dependency file label Feb 4, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Feb 4, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: thinking-in-react@0.1.0
npm ERR! Found: eslint@8.57.1
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.57.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^9 || ^10" from eslint-plugin-react-refresh@0.5.2
npm ERR! node_modules/eslint-plugin-react-refresh
npm ERR!   dev eslint-plugin-react-refresh@"^0.5.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /runner/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /runner/cache/others/npm/_logs/2026-03-05T21_01_14_867Z-debug-0.log

@renovate renovate bot force-pushed the renovate/dev-deps-minor branch from 470b95f to 5e64a9e Compare February 17, 2026 15:07
@renovate renovate bot force-pushed the renovate/dev-deps-minor branch from 5e64a9e to 7dcc61d Compare February 26, 2026 08:55
@renovate renovate bot changed the title chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.0 chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.1 Feb 26, 2026
@renovate renovate bot force-pushed the renovate/dev-deps-minor branch from 7dcc61d to 62c079c Compare February 26, 2026 20:43
@renovate renovate bot changed the title chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.1 chore(dev-deps): update dependency eslint-plugin-react-refresh to ^0.5.2 Feb 26, 2026
@palashmon palashmon closed this Mar 13, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Mar 13, 2026

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (^0.5.2). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/dev-deps-minor branch March 13, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant