-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
ESLint rule idea: <style>
is not allowed inside _document.js
#32656
Comments
Hello there! I'd like to work on that. New to codebase, any tips or guides will be highly appreciated, thanks! |
Hello @radosvet93. Make sure to read the Code of Conduct and the Contributing guide first! ESLint rules are located in this folder: https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next/lib/rules Always add tests along with your new features 🙂 . Once a PR is opened, automatic tests / lint will be performed on your code. A Next.js maintainer will review your code whenever they can. |
Hello is there anyone working on this already. |
## Bug - [ ] Related issues linked fixes #32656 Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the feature you'd like to request
As per the docs: https://nextjs.org/docs/advanced-features/custom-document#caveats
styled-jsx is not allowed inside custom
_document.js
and I was getting 500 errors on all SSR pages when deploying a site to production that had a<style>
tag inside a custom_document.js
.I think it's a good idea to add an ESLint rule to remind users about this since the error I got did not make it straightforward to figure out the root cause of the issue.
Describe the solution you'd like
Add a new ESLint rule warning about the use of
<style>
tags inside a custom_document.js
Describe alternatives you've considered
Maybe prevent the build if a
<style>
tag is detected inside a custom_document.js
The text was updated successfully, but these errors were encountered: