Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-refresh

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-refresh - npm Package Versions

23

0.4.16

Diff

Changelog

Source

0.4.16

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

arnaud-barre
published 0.4.15 •

Changelog

Source

0.4.15

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.

arnaud-barre
published 0.4.14 •

Changelog

Source

0.4.14

  • Warn if a context is exported alongside a component (fixes #53). Thanks @IgorAufricht!
arnaud-barre
published 0.4.13 •

Changelog

Source

0.4.13

  • Support for react-redux connect (export default connect(mapStateToProps, mapDispatchToProps)(MyComponent)) (fixes #51)
  • Support for Arbitrary Module Identifiers syntax (fixes #52)
arnaud-barre
published 0.4.12 •

Changelog

Source

0.4.12

  • Support type assertion on default export (fixes #48)
  • Add default export to fix usage with jiti (fixes #50)
arnaud-barre
published 0.4.11 •

Changelog

Source

0.4.11

  • Ignore type exports (ex. export type foo = string;) (fixes #47)
arnaud-barre
published 0.4.10 •

Changelog

Source

0.4.10

  • Support function Foo() {}; export default React.memo(Foo) (#46) (thanks @SukkaW!)
arnaud-barre
published 0.4.9 •

Changelog

Source

0.4.9

  • Support function Foo() {}; export default memo(Foo) (fixes #44) (thanks @SukkaW!)
arnaud-barre
published 0.4.8 •

Changelog

Source

0.4.8

  • Support export const foo = -1 with allowConstantExport (fixes #43)
arnaud-barre
published 0.4.7 •

Changelog

Source

0.4.7

  • Support export { Component as default } (fixes #41)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc