Skip to content

Releases: ArnaudBarre/eslint-plugin-react-refresh

v0.4.23

01 Oct 21:48
Compare
Choose a tag to compare
  • Add "metadata", "generateMetadata" & "generateViewport" to allowExportNames in Next config

v0.4.22

25 Sep 16:22
Compare
Choose a tag to compare
  • Add "viewport" to allowExportNames in Next config (#89)

v0.4.21

22 Sep 23:01
Compare
Choose a tag to compare
  • 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,
];

v0.4.20

21 Apr 22:25
Compare
Choose a tag to compare
  • Don't warn on nested HOC calls (fixes #79)
  • Fix false positive with as const (fixes #80)

v0.4.19

09 Feb 00:19
Compare
Choose a tag to compare

Add name to configs for ESLint Config Inspector

v0.4.18

11 Jan 21:12
Compare
Choose a tag to compare

ESM/CJS interop is the worse that happened to this ecosystem, this is all I have to say.

v0.4.17

11 Jan 20:16
Compare
Choose a tag to compare
  • Fix detection of local components to not generate warning on for variable inside JSX files that follow React component naming (fixes #75)
  • Update types to not require extra unnecessary .default property access under TS node16 module resolution (fixes #70)

v0.4.16

02 Dec 11:39
Compare
Choose a tag to compare

Fix CJS/ESM interop issue. Sorry everyone for the trouble.

v0.4.15

02 Dec 09:38
Compare
Choose a tag to compare

Add support for custom HOCs (#60)

By default, the rule only knows that memo & forwardRef function calls with return a React component. With this option, you can also allow extra function names like Mobx observer to make this code valid:

const Foo = () => <></>;
export default observer(Foo);
{
  "react-refresh/only-export-components": [
    "error",
    { "customHOCs": ["observer"] }
  ]
}

Thanks @HorusGoul!

Add recommended config and simple types (#67)

You can now add the recommended config to your ESLint config like this:

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

export default [
  /* Main config */
  reactRefresh.configs.recommended, // Or reactRefresh.configs.vite for Vite users
];

To follow ESLint recommandations, the rule is added with the error severity.

Some simple types ensure that people typecheking their config won't need @ts-expect-error anymore.

Bump ESLint peer dependency to 8.40

This was actually done by mistake in the previous release when moving from a deprecated API to a new one.

Given that ESLint 8 is officialy end-of-life and the only report (#56) didn't get likes, I'm going forward and documenting the expected minimum version from ESLin in the package JSON so that people can get warning from their package manager.

v0.4.14

24 Oct 18:14
Compare
Choose a tag to compare
  • Warn if a context is exported alongside a component (fixes #53). Thanks @IgorAufricht!