nextjs/no-before-interactive-script-outside-document Correctness
What it does
Prevent usage of next/script
's beforeInteractive
strategy 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-before-interactive-script-outside-document --nextjs-plugin
json
{
"plugins": ["nextjs"],
"rules": {
"nextjs/no-before-interactive-script-outside-document": "error"
}
}