{"id":19905,"library":"eslint-plugin-react-rsc","title":"eslint-plugin-react-rsc","description":"ESLint plugin providing React Server Component (RSC) related lint rules from the eslint-react project. The current stable version is v4.2.3. The plugin requires ESLint ^10.0.0 and Node.js >=20.19.0, and ships TypeScript type declarations. It is part of the @eslint-react monorepo, which has active beta development with frequent releases. Differentiators: focused purely on RSC patterns, part of a larger eslint-react ecosystem, and written in TypeScript with full type support.","status":"active","version":"4.2.3","language":"javascript","source_language":"en","source_url":"https://github.com/Rel1cx/eslint-react","tags":["javascript","react","eslint","eslint-react","eslint-plugin","eslint-plugin-react-rsc","typescript"],"install":[{"cmd":"npm install eslint-plugin-react-rsc","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-react-rsc","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-react-rsc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: required to function as an ESLint plugin","package":"eslint","optional":false},{"reason":"Peer dependency: required for type-checked rules","package":"typescript","optional":true}],"imports":[{"note":"ESM-only package since v4; CommonJS require throws.","wrong":"const eslintPluginReactRsc = require('eslint-plugin-react-rsc')","symbol":"default","correct":"import eslintPluginReactRsc from 'eslint-plugin-react-rsc'"},{"note":"configs is an object; use configs['recommended'] or configs.recommended.","wrong":"import { recommended } from 'eslint-plugin-react-rsc'","symbol":"configs","correct":"import { configs } from 'eslint-plugin-react-rsc'"},{"note":"rules is a record of rule modules.","wrong":"","symbol":"rules","correct":"import { rules } from 'eslint-plugin-react-rsc'"}],"quickstart":{"code":"// eslint.config.js\nimport eslintPluginReactRsc from 'eslint-plugin-react-rsc'\n\nexport default [\n  {\n    plugins: {\n      'react-rsc': eslintPluginReactRsc\n    },\n    rules: {\n      'react-rsc/no-server-import': 'error',\n      'react-rsc/no-client-import': 'error',\n      'react-rsc/no-unsafe-component': 'error'\n    }\n  }\n]","lang":"typescript","description":"Basic setup of eslint-plugin-react-rsc in an ESLint flat config, enabling three core RSC rules."},"warnings":[{"fix":"Use import syntax or dynamic import; ensure 'type': 'module' in package.json.","message":"Package is ESM-only since v4.0.0. CommonJS require() will fail.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade ESLint to version 10 or later.","message":"Requires ESLint ^10.0.0 as a peer dependency. Older ESLint versions are incompatible.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Node.js to version 20.19.0 or later.","message":"Requires Node.js >=20.19.0.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Install TypeScript as a dev dependency if using type-aware rules.","message":"TypeScript is an optional peer dependency, but type-checked rules require it. Missing TypeScript will cause runtime errors on those rules.","severity":"gotcha","affected_versions":"*"},{"fix":"Pin to v4.x for production.","message":"Some rule names may change in v5 (beta). The stable v4 API should be used for now.","severity":"deprecated","affected_versions":"5.0.0-beta.x"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Switch to import syntax: import eslintPluginReactRsc from 'eslint-plugin-react-rsc'","cause":"CommonJS require() used on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-react-rsc/index.js not supported."},{"fix":"Run npm install eslint@^10.0.0","cause":"Peer dependency eslint not installed or incorrect version.","error":"Error: Cannot find module 'eslint-plugin-react-rsc'"},{"fix":"Use configs.recommended or configs['recommended'].","cause":"Attempting to destructure 'recommended' directly from import instead of accessing via configs object.","error":"TypeError: Cannot read properties of undefined (reading 'recommended')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}