We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-refresh/only-export-components
Next.js allows users to export metadata objects in pages and layouts:
export const metadata = { title: 'Acme', openGraph: { title: 'Acme', description: 'Acme is a...', }, }
This conflicts with the react-refresh/only-export-components rule.
None
No response
eslint .
The text was updated successfully, but these errors were encountered:
So we should disable the rule in this file, only for pages and layouts.
Sorry, something went wrong.
I'm thinking of whitelisting it for metadata only, like:
metadata
"react-refresh/only-export-components": [ "error", { allowExportNames: ["metadata"] }, ]
What do you think?
Oh yeah, even better, but i think we should still do it only in that file.
Also in the react config file we could add { allowExportNames: ["loader"] }
{ allowExportNames: ["loader"] }
musjj
Successfully merging a pull request may close this issue.
Your environment
Describe the bug
Next.js allows users to export metadata objects in pages and layouts:
This conflicts with the
react-refresh/only-export-components
rule.Project
None
Minimal reproduction
No response
Steps to reproduce
eslint .
Logs
Code of Conduct
I will submit a PR
The text was updated successfully, but these errors were encountered: