Don't warn when components are exported as an object gathering them. Every member of the object must be a component, and a member holding an anonymous function requires a component name as key.
This should be enabled if the fast refresh implementation correctly handles this case. Vite supports it since @vitejs/plugin-react 4.7.0, @vitejs/plugin-react-swc 3.11.0.
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | devDependencies | patch | [`0.5.2` → `0.5.7`](https://renovatebot.com/diffs/npm/eslint-plugin-react-refresh/0.5.2/0.5.7) |
---
### Release Notes
<details>
<summary>ArnaudBarre/eslint-plugin-react-refresh (eslint-plugin-react-refresh)</summary>
### [`v0.5.7`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/HEAD/CHANGELOG.md#057)
[Compare Source](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.6...v0.5.7)
##### Add `allowCompoundComponents` option ([#​117](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/pull/117))
> Default: `false` (`true` in `vite` config)
Don't warn when components are exported as an object gathering them. Every member of the object must be a component, and a member holding an anonymous function requires a component name as key.
This should be enabled if the fast refresh implementation correctly handles this case. Vite supports it since `@vitejs/plugin-react` 4.7.0, `@vitejs/plugin-react-swc` 3.11.0.
```json
{
"react-refresh/only-export-components": [
"error",
{ "allowCompoundComponents": true }
]
}
```
Enabling this option allows code such as the following:
```jsx
const Root = () => <></>;
const Label = () => <></>;
export const Tag = { Root, Label };
```
### [`v0.5.6`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/HEAD/CHANGELOG.md#056)
[Compare Source](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.5...v0.5.6)
- Support re-exporting namespace components (fixes [#​116](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/issues/116))
### [`v0.5.5`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/HEAD/CHANGELOG.md#055)
[Compare Source](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.4...v0.5.5)
- Fix SCREAMING_SNAKE_CASE constant exported via `export { Name }` incorrectly treated as React component [#​114](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/pull/114) (fixes [#​113](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/issues/113))
- Add `contentType` and `size` to `allowExportNames` in Next config [#​115](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/pull/115)
### [`v0.5.4`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/HEAD/CHANGELOG.md#054)
[Compare Source](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.3...v0.5.4)
- Add `instant` to `allowExportNames` in Next config [#​112](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/pull/112)
### [`v0.5.3`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/HEAD/CHANGELOG.md#053)
[Compare Source](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.5.2...v0.5.3)
- Fix check for non component class exported via `export { }` [#​110](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/pull/110) (fixes [#​109](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/issues/109))
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- At any time (no schedule defined)
- 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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
0.5.2→0.5.7Release Notes
ArnaudBarre/eslint-plugin-react-refresh (eslint-plugin-react-refresh)
v0.5.7Compare Source
Add
allowCompoundComponentsoption (#117)Don't warn when components are exported as an object gathering them. Every member of the object must be a component, and a member holding an anonymous function requires a component name as key.
This should be enabled if the fast refresh implementation correctly handles this case. Vite supports it since
@vitejs/plugin-react4.7.0,@vitejs/plugin-react-swc3.11.0.Enabling this option allows code such as the following:
v0.5.6Compare Source
v0.5.5Compare Source
export { Name }incorrectly treated as React component #114 (fixes #113)contentTypeandsizetoallowExportNamesin Next config #115v0.5.4Compare Source
instanttoallowExportNamesin Next config #112v0.5.3Compare Source
export { }#110 (fixes #109)Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate CLI.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.