Open mwskwong opened 6 months ago
We've had feedback that this is frustrating, and we did open the conversation to support named exports in Next.js, but I think that was hard for them to prioritise. https://github.com/vercel/next.js/issues/35717
I'd be happy for you to create a PR for this if you'd like?
@mrmckeb Just wondering what's the direction Vercel is going regarding this? If there isn't a clear plan on changing things to like export const Page = ...
yet, I'm happy to create a PR on updating the ESLint config.
There isn't that I'm aware of, sorry. It's something we've discussed before, but I don't think it's on the roadmap.
There isn't that I'm aware of, sorry. It's something we've discussed before, but I don't think it's on the roadmap.
Since ESLint v9 is making use of flat config by default, I believe it may be beneficial to focus on that first before applying this change to avoid double effort.
There are a few file conventions in Next.js that must contain default export. Currently, using this style guide out of the box will cause an error in those files, because of the
import/no-default-export
rule. It is suggested to override those specific files to enforce default export. e.g.