npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

eslint-plugin-rxjs-angular-x

v0.1.0

Published

ESLint v9+ rules for RxJS and Angular

Readme

eslint-plugin-rxjs-angular-x

GitHub License NPM version

This ESLint plugin is intended to prevent issues with combined use of RxJS and Angular.

There is no recommended configuration for this package, as all of the rules are opinionated.

Migration Guide from eslint-plugin-rxjs-angular

This project started as a fork of eslint-plugin-rxjs-angular initially started to support the new ESLint flat config format.

  1. Migrate your config from the old .eslintrc format to eslint.config.mjs (or similar), and uninstall eslint-plugin-rxjs-angular.

    • See ESLint's guide here: [https://eslint.org/docs/latest/use/configure/migration-guide].
    • If you need to continue using the deprecated format, use the original eslint-plugin-rxjs or a different fork.
  2. Install eslint-plugin-rxjs-angular-x, and import it into your config.

    + import rxjsAngularX from 'eslint-plugin-rxjs-angular-x;
  3. Add the plugin to your plugins block with the new namespace:

    plugins: {
    +   'rxjs-angular-x': rxjsAngularX,
    }
  4. In your rules block, replace the namespace rxjs-angular with rxjs-angular-x:

    -   'rxjs-angular/prefer-async-pipe': 'error',
    +   'rxjs-angular-x/prefer-async-pipe': 'error',

[!TIP] A complete description of all changes are documented in the CHANGELOG file.

Installation Guide

See typescript-eslint's Getting Started for a full ESLint setup guide.

  1. Enable typed linting.
  2. Add this plugin and any desired rules to your eslint.config.mjs.
// @ts-check
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import rxjsAngularX from 'eslint-plugin-rxjs-angular-x';

export default defineConfig({
    extends: [
        ...tseslint.configs.recommended,
    ],
    languageOptions: {
        parserOptions: {
            projectService: true,
        },
    },
    plugins: {
        'rxjs-angular-x': rxjsAngularX,
    },
    rules: {
        'rxjs-angular-x/prefer-async-pipe': 'error',
    },
});

Examples

The following is another example, with options:

// @ts-check
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import rxjsAngularX from 'eslint-plugin-rxjs-angular-x';

export default defineConfig({
    extends: [
        ...tseslint.configs.recommended,
    ],
    languageOptions: {
        parserOptions: {
            projectService: true,
        },
    },
    plugins: {
        'rxjs-angular-x': rxjsAngularX,
    },
    rules: {
        'rxjs-angular-x/prefer-takeuntil': [
            'error',
            {
                checkComplete: true,
                checkDecorators: ["Component", "Directive", "Injectable"],
                alias: ["takeUntilDestroyed"],
                checkDestroy: false,
            },
        ],
    },
});

Rules

The package includes the following rules:

💭 Requires type information.

| Name               | Description | 💭 | | :----------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :- | | prefer-async-pipe | Disallow the calling of subscribe within Angular components. | 💭 | | prefer-composition | Disallow subscribe calls that are not composed within Angular components (and, optionally, within services, directives, and pipes). | 💭 | | prefer-takeuntil | Disallow subscribe calls without an accompanying takeUntil within Angular components (and, optionally, within services, directives, and pipes). | 💭 |