eslint-plugin-rxjs-updated

raw JSON →
1.0.50 verified Sat Apr 25 auth: no javascript

A community fork of cartant's eslint-plugin-rxjs that updates the plugin for compatibility with ESLint v9 and TypeScript 4+. It provides a comprehensive set of ESLint rules for RxJS, including recommended configurations and fixers, but does not accept PRs for new features or bug fixes — users should contact the original maintainer for upstream issues. Current stable version is 1.0.50, with regular weekly dependency updates. The package requires eslint ^9.0.0 and typescript >=4.0.0 as peer dependencies, and ships TypeScript type definitions. It is essentially a drop-in replacement for the original eslint-plugin-rxjs for projects migrating to ESLint 9.

error Error: Failed to load plugin 'rxjs' declared in 'plugins': Cannot find module 'eslint-plugin-rxjs'
cause Installed eslint-plugin-rxjs-updated but referenced as 'rxjs' in ESLint config, but package is not actually named 'eslint-plugin-rxjs'.
fix
Ensure eslint-plugin-rxjs-updated is installed. Although the plugin name in ESLint is 'rxjs', the module is found under 'eslint-plugin-rxjs-updated'. Do NOT install eslint-plugin-rxjs separately.
error Parsing error: Cannot read file 'tsconfig.json'
cause parserOptions.project points to a tsconfig.json that doesn't exist or is not accessible.
fix
Check the path in parserOptions.project: use join(__dirname, './tsconfig.json') or absolute path.
error Error: @typescript-eslint/parser requires a project path to use TypeScript rules
cause Missing parserOptions.project when using rules that require type information.
fix
Add parserOptions.project with path to your tsconfig.json.
breaking Requires ESLint v9 — not compatible with ESLint v8 or earlier.
fix Use eslint-plugin-rxjs (original) for ESLint v8 projects. This fork only supports ESLint v9.
gotcha Plugin name in ESLint config is 'rxjs' not 'rxjs-updated' — ESLint derives the name from the package name minus the '-updated' suffix.
fix Use 'rxjs' in plugins and extends (e.g., 'plugin:rxjs/recommended').
breaking No new features or bug fixes accepted — this is a maintenance fork only.
fix Report issues to the original eslint-plugin-rxjs repository. Do not expect fixes or new rules here.
deprecated Some rules (e.g., fiverr) may be removed in future versions; the fork is not actively maintained for upstream changes.
fix Pin version and migrate to original plugin if upstream resolves ESLint v9 compatibility.
gotcha TypeScript and @typescript-eslint/parser v6+ may have breaking changes for project configuration — ensure your tsconfig.json is compatible.
fix Ensure parserOptions.project points to a valid tsconfig.json and update @typescript-eslint/parser to v8+ for ESLint v9.
npm install eslint-plugin-rxjs-updated
yarn add eslint-plugin-rxjs-updated
pnpm add eslint-plugin-rxjs-updated

Minimal ESLint v9 configuration using the recommended RxJS ruleset with TypeScript parser.

// Install: npm install eslint-plugin-rxjs-updated @typescript-eslint/parser --save-dev
// .eslintrc.cjs
const { join } = require('path');
module.exports = {
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 2020,
    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',
    'rxjs/no-unbound-methods': 'error',
    'rxjs/throw-error': 'error'
  }
};