I needed a place to put this and it didn't feel deserving of its own package or repo, hence here it is.
eslint-plugin-react-refresh
settings for Next.js for rule "react-refresh/only-export-components
" exports in Next.js.
For more information, see Next.js: Introduction > Architecture > Fast Refresh#How It Works
FYI some other exports that are not here because they shouldn't be alongside JSX are:
[
/**
* {@link https://nextjs.org/docs/app/api-reference/file-conventions/middleware#config-object-optional}
*/
"config",
/**
*
* @see {@link https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest}
*/
"manifest",
/**
* @see {@link https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots}
*/
"robots",
/**
* @see {@link https://nextjs.org/docs/app/api-reference/functions/generate-sitemaps}
*/
"generateSitemaps",
/**
* @see {@link https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap}
*/
"sitemap",
]