Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

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

Support no-default-exports workflows #35717

Closed
mrmckeb opened this issue Mar 30, 2022 · 0 comments
Closed

Support no-default-exports workflows #35717

mrmckeb opened this issue Mar 30, 2022 · 0 comments

Comments

@mrmckeb
Copy link
Contributor

mrmckeb commented Mar 30, 2022

Describe the feature you'd like to request

Our style guide enforces import/no-default-export. We find this helps with TypeScript IntelliSense (auto-completion) in IDEs like VSCode.

Right now, Next.js requires default exports in pages and API routes.

Describe the solution you'd like

Where Next.js expects default exports today, we'd like the option of using named exports.

For example:

// pages/my-page.tsx

export function Page ()  { /* .. */ }

export async function getServerSideProps () { /* .. */ }

Describe alternatives you've considered

We could, as an alternative, disable this rule for anything in the pages directory (and in any other places it would be needed).

@vercel vercel locked and limited conversation to collaborators Mar 30, 2022
@balazsorban44 balazsorban44 converted this issue into discussion #35725 Mar 30, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant