Skip to content

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

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

chore(deps): update dependency eslint-plugin-react-refresh to ^0.5.2#1665
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/eslint-plugin-react-refresh-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Feb 18, 2026

This PR contains the following updates:

Package Change Age Confidence
eslint-plugin-react-refresh ^0.4.19^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"] }]
}

Configuration

📅 Schedule: (in timezone Europe/London)

  • Branch creation
    • "after 01:00 and before 07:00 every weekday"
  • 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 2584216 to cf2213f Compare February 23, 2026 21:13
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 4 times, most recently from fa35e59 to 476c6d4 Compare March 5, 2026 15:25
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 9f60274 to e21621e Compare March 13, 2026 10:36
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 3 times, most recently from 249fbdc to 3149a07 Compare March 25, 2026 08:52
@renovate renovate Bot changed the title chore(deps): update dependency eslint-plugin-react-refresh to ^0.5.0 chore(deps): update dependency eslint-plugin-react-refresh to ^0.5.2 Mar 26, 2026
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 6 times, most recently from fe6547e to 82919be Compare April 1, 2026 13:05
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 11964e0 to 1f7aa0e Compare April 15, 2026 13:28
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 2 times, most recently from 4d5e1e1 to 298f6cb Compare April 29, 2026 12:39
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 298f6cb to 2879cce Compare May 4, 2026 08:27
@renovate renovate Bot force-pushed the renovate/eslint-plugin-react-refresh-0.x branch 4 times, most recently from e4d9f55 to 7106303 Compare May 13, 2026 08:01
@samuv samuv force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 7106303 to 47c88e8 Compare May 14, 2026 11:05
@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented May 14, 2026

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@samuv samuv enabled auto-merge (squash) May 14, 2026 11:35
peppescg
peppescg previously approved these changes May 14, 2026
renovate Bot and others added 2 commits May 14, 2026 14:35
eslint-plugin-react-refresh 0.5 tightened the only-export-components
rule and removed the built-in carve-outs for non-component exports:

- Tell the rule about TanStack Router's `createFileRoute` and
  `createRootRouteWithContext` via `extraHOCs`, so co-locating the
  `Route` export with its component (our project convention) no
  longer trips the rule. Per the plugin's note this isn't a
  perfect-HMR setup for those files, but it matches how the routes
  are already authored.
- Allow non-array constant exports alongside components via
  `allowConstantExport: true`, then move `DEFAULT_PAGE_SIZE_OPTIONS`
  (which is an array literal, still flagged) to a dedicated
  constants file imported by both `pagination.tsx` and the skills
  registry-pagination helper.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@samuv samuv force-pushed the renovate/eslint-plugin-react-refresh-0.x branch from 47c88e8 to 94f32f5 Compare May 14, 2026 12:41
@samuv samuv requested a review from peppescg May 14, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants