You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when setting pageExtensions in next.config.js to e.g. page.tsx, the "no-document-import-in-page" rule included in eslint-plugin-next falsely warns that "next/document should not be imported outside of pages/_document.js."
Expected Behavior
eslint rule should respect pageExtensions
To Reproduce
create next project with yarn create next-app --typescript and enable eslint
add pageExtensions: ["page.tsx"] to next.config.js
add pages/_document.page.tsx and see error
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 27, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
14.17.0
What browser are you using?
Firefox
What operating system are you using?
Ubuntu
How are you deploying your application?
Describe the Bug
when setting
pageExtensions
innext.config.js
to e.g.page.tsx
, the "no-document-import-in-page" rule included ineslint-plugin-next
falsely warns that "next/document should not be imported outside of pages/_document.js."Expected Behavior
eslint rule should respect
pageExtensions
To Reproduce
yarn create next-app --typescript
and enable eslintpageExtensions: ["page.tsx"]
tonext.config.js
pages/_document.page.tsx
and see errorThe text was updated successfully, but these errors were encountered: