Registry / testing / eslint-plugin-react-rsc

eslint-plugin-react-rsc

JSON →
library4.2.3jsnpmunverified

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.

npm install eslint-plugin-react-rsc
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-REAC
E
eslint-plugin-react-rsc
testingjavascriptv4.2.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import eslintPluginReactRsc from 'eslint-plugin-react-rsc'
const eslintPluginReactRsc = require('eslint-plugin-react-rsc')
ESM-only package since v4; CommonJS require throws.
configs
import { configs } from 'eslint-plugin-react-rsc'
import { recommended } from 'eslint-plugin-react-rsc'
configs is an object; use configs['recommended'] or configs.recommended.
rules
import { rules } from 'eslint-plugin-react-rsc'
rules is a record of rule modules.

Basic setup of eslint-plugin-react-rsc in an ESLint flat config, enabling three core RSC rules.

// eslint.config.js import eslintPluginReactRsc from 'eslint-plugin-react-rsc' export default [ { plugins: { 'react-rsc': eslintPluginReactRsc }, rules: { 'react-rsc/no-server-import': 'error', 'react-rsc/no-client-import': 'error', 'react-rsc/no-unsafe-component': 'error' } } ]
Debug
Known issues
breakingPackage is ESM-only since v4.0.0. CommonJS require() will fail.
fix
Use import syntax or dynamic import; ensure 'type': 'module' in package.json.
affects: >=4.0.0
breakingRequires ESLint ^10.0.0 as a peer dependency. Older ESLint versions are incompatible.
fix
Upgrade ESLint to version 10 or later.
affects: >=4.0.0
breakingRequires Node.js >=20.19.0.
fix
Upgrade Node.js to version 20.19.0 or later.
affects: >=4.0.0
gotchaTypeScript is an optional peer dependency, but type-checked rules require it. Missing TypeScript will cause runtime errors on those rules.
fix
Install TypeScript as a dev dependency if using type-aware rules.
affects: *
deprecatedSome rule names may change in v5 (beta). The stable v4 API should be used for now.
fix
Pin to v4.x for production.
affects: 5.0.0-beta.x
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-react-rsc/index.js not supported.
CommonJS require() used on an ESM-only package.
fix
Switch to import syntax: import eslintPluginReactRsc from 'eslint-plugin-react-rsc'
Error: Cannot find module 'eslint-plugin-react-rsc'
Peer dependency eslint not installed or incorrect version.
fix
Run npm install eslint@^10.0.0
TypeError: Cannot read properties of undefined (reading 'recommended')
Attempting to destructure 'recommended' directly from import instead of accessing via configs object.
fix
Use configs.recommended or configs['recommended'].
Upgrade
Version history
4.2.3latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: required to function as an ESLint plugin
typescriptoptionalPeer dependency: required for type-checked rules
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-react-rsc — npm install eslint-plugin-react-rsc · libregistry