Rules for React server components
npm install eslint-plugin-react-server-componentsExperiment in making an ESLint rule for enforcing "use client" in client components (and warning if it's not needed).
``bash`
npm install --save-dev eslint-plugin-react-server-components
To use the recommended configuration:
`json5`
// eslintrc.json
{
extends: ["plugin:react-server-components/recommended"],
}
> Enforce components are appropriately prefixed with 'use client'.
`json``
{
"rules": {
"react-server-components/use-client": "error"
}
}