Registry / testing / eslint-plugin-rxjs

eslint-plugin-rxjs

JSON →
library5.0.3jsnpmunverified

ESLint plugin providing a comprehensive set of rules for RxJS (v5, 2024). It reimplements the rules from rxjs-tslint-rules for ESLint, covering common mistakes like async subscribe, ignored observables, nested subscribes, and more. Almost all rules require @typescript-eslint/parser and a TypeScript project. The package includes a recommended configuration with opinionated rules separate. Release cadence is stable with frequent updates. Compared to alternatives like eslint-plugin-rxjs-angular (Angular-specific), this plugin covers generic RxJS patterns across frameworks.

npm install eslint-plugin-rxjs
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-RXJS
E
eslint-plugin-rxjs
testingjavascriptv5.0.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.

plugin
plugins: ['rxjs']
plugins: ['eslint-plugin-rxjs']
Use shorthand 'rxjs' in ESLint config; the full name is not needed.
recommended config
extends: ['plugin:rxjs/recommended']
extends: ['eslint:recommended']
Only the plugin's recommended config enables its rules.
rules
rules: { 'rxjs/no-async-subscribe': 'error' }
rules: { 'rxjs/no-async-subscribe': 2 }
Rule names are prefixed with 'rxjs/' and values use string 'error' not numeric 2.

Setup ESLint with rxjs plugin, using @typescript-eslint/parser and recommended config.

// In .eslintrc.js const { join } = require('path'); module.exports = { parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2019, project: join(__dirname, './tsconfig.json'), sourceType: 'module', }, plugins: ['rxjs'], extends: ['plugin:rxjs/recommended'], rules: { 'rxjs/no-async-subscribe': 'error', 'rxjs/no-ignored-observable': 'error', 'rxjs/no-ignored-subscription': 'error', 'rxjs/no-nested-subscribe': 'error', }, };
Debug
Known issues
breakingBreaking: v5 removed support for ESLint <8 and changed some rule names
fix
Upgrade eslint to ^8.0.0 and check rule names; see migration guide.
affects: >=5.0.0
gotchaMost rules require TypeScript parser and 'project' option for type checking
fix
Ensure @typescript-eslint/parser is installed and parserOptions.project points to tsconfig.json.
affects: >=0.0.0
deprecatedRules like 'rxjs/no-operator' and 'rxjs/no-wholesale' removed in v5
fix
Replace with equivalent rules or disable.
affects: >=5.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-rxjs'
Package not installed
fix
Run 'npm install eslint-plugin-rxjs --save-dev'
Error: Parsing error: 'parser' is not set
Missing @typescript-eslint/parser configuration
fix
Set parser: '@typescript-eslint/parser' in ESLint config and install the package.
Error: Rule 'rxjs/no-async-subscribe' requires type information
parserOptions.project not set or missing tsconfig
fix
Add parserOptions.project pointing to your tsconfig.json
Upgrade
Version history
5.0.3latest on npm
Audit
Dependencies
@typescript-eslint/parserrequiredRequired for parsing TypeScript code and type-aware rules
typescriptrequiredPeer dependency for TypeScript type checking in rules
eslintrequiredPeer dependency for ESLint runtime
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-rxjs — npm install eslint-plugin-rxjs · libregistry