gspot/require-server-only
Checks that a selected server module imports “server-only” or declares “use server”.
No config turns it on; turn it on in your ESLint config.
A server-only marker lets Next.js reject client imports of a module that uses private server capabilities.
What to do
Section titled “What to do”Add import “server-only” to the imports. Use “use server” only for a module that follows the Server Actions contract. If the file is not server code, remove it from the files this rule selects.
Example
Section titled “Example”A selected server module containing export const secret = 1; reports missing. With the server-only package installed, add import "server-only"; before that declaration.
Options
Section titled “Options”This rule has no options.