nextjs/no-document-import-in-page Correctness ​
What it does ​
Prevent importing next/document
outside of pages/_document.js
.
Why is this bad? ​
Example ​
javascript
How to use ​
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny nextjs/no-document-import-in-page --nextjs-plugin
json
{
"plugins": ["nextjs"],
"rules": {
"nextjs/no-document-import-in-page": "error"
}
}