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 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-plugin-rxjs-x

v0.2.4

Published

ESLint v9+ plugin for RxJS

Downloads

1,511

Readme

eslint-plugin-rxjs-x

GitHub License NPM version

This package contains a bunch of ESLint v9+ rules for RxJS. It is a fork of eslint-plugin-rxjs initially started to support the new ESLint flat config format. The original package is itself a re-implementation of the rules that are in the rxjs-tslint-rules package. (The Angular-specific rules in rxjs-tslint-rules have been re-implemented in eslint-plugin-rxjs-angular.)

Some of the rules are rather opinionated and are not included in the recommended configuration. Developers can decide for themselves whether they want to enable opinionated rules.

Almost all of these rules require the TypeScript parser for ESLint and are indicated as such below.

Install

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

Then use the recommended configuration in your eslint.config.mjs and enable typed linting:

// @ts-check
import tseslint from 'typescript-eslint';
import rxjsX from 'eslint-plugin-rxjs-x';

export default tseslint.config({
    extends: [
        ...tseslint.configs.recommended,
        rxjsX.configs.recommended,
    ],
    languageOptions: {
        parserOptions: {
            projectService: true,
        },
    },
});

The above example uses typescript-eslint's built-in config to set up the TypeScript parser for us. Enabling projectService then turns on typed linting. See Linting with Type Information for details.

Configs

| | Name | | :- | :------------ | | ✅ | recommended |

Rules

The package includes the following rules.

💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
💭 Requires type information.
❌ Deprecated.

| Name                       | Description | 💼 | 🔧 | 💡 | 💭 | ❌ | | :--------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | :- | :- | :- | :- | :- | | ban-observables | Disallow banned observable creators. | | | | | | | ban-operators | Disallow banned operators. | | | | | | | finnish | Enforce Finnish notation. | | | | 💭 | | | just | Require the use of just instead of of. | | 🔧 | | | | | macro | Require the use of the RxJS Tools Babel macro. | | 🔧 | | | ❌ | | no-async-subscribe | Disallow passing async functions to subscribe. | ✅ | | | 💭 | | | no-compat | Disallow the rxjs-compat package. | | | | | | | no-connectable | Disallow operators that return connectable observables. | | | | 💭 | | | no-create | Disallow the static Observable.create function. | ✅ | | | 💭 | | | no-cyclic-action | Disallow cyclic actions in effects and epics. | | | | 💭 | | | no-explicit-generics | Disallow unnecessary explicit generic type arguments. | | | | | | | no-exposed-subjects | Disallow public and protected subjects. | | | | 💭 | | | no-finnish | Disallow Finnish notation. | | | | 💭 | | | no-ignored-error | Disallow calling subscribe without specifying an error handler. | | | | 💭 | | | no-ignored-notifier | Disallow observables not composed from the repeatWhen or retryWhen notifier. | ✅ | | | 💭 | | | no-ignored-observable | Disallow ignoring observables returned by functions. | | | | 💭 | | | no-ignored-replay-buffer | Disallow using ReplaySubject, publishReplay or shareReplay without specifying the buffer size. | ✅ | | | | | | no-ignored-subscribe | Disallow calling subscribe without specifying arguments. | | | | 💭 | | | no-ignored-subscription | Disallow ignoring the subscription returned by subscribe. | | | | 💭 | | | no-ignored-takewhile-value | Disallow ignoring the value within takeWhile. | ✅ | | | | | | no-implicit-any-catch | Disallow implicit any error parameters in catchError operators. | ✅ | 🔧 | 💡 | 💭 | | | no-index | Disallow importing index modules. | ✅ | | | | | | no-internal | Disallow importing internal modules. | ✅ | 🔧 | 💡 | | | | no-nested-subscribe | Disallow calling subscribe within a subscribe callback. | ✅ | | | 💭 | | | no-redundant-notify | Disallow sending redundant notifications from completed or errored observables. | ✅ | | | 💭 | | | no-sharereplay | Disallow unsafe shareReplay usage. | ✅ | | | | | | no-subclass | Disallow subclassing RxJS classes. | | | | 💭 | | | no-subject-unsubscribe | Disallow calling the unsubscribe method of subjects. | ✅ | | | 💭 | | | no-subject-value | Disallow accessing the value property of a BehaviorSubject instance. | | | | 💭 | | | no-subscribe-handlers | Disallow passing handlers to subscribe. | | | | 💭 | | | no-tap | Disallow the tap operator. | | | | | ❌ | | no-topromise | Disallow use of the toPromise method. | | | | 💭 | | | no-unbound-methods | Disallow passing unbound methods. | ✅ | | | 💭 | | | no-unsafe-catch | Disallow unsafe catchError usage in effects and epics. | | | | 💭 | | | no-unsafe-first | Disallow unsafe first/take usage in effects and epics. | | | | 💭 | | | no-unsafe-subject-next | Disallow unsafe optional next calls. | ✅ | | | 💭 | | | no-unsafe-switchmap | Disallow unsafe switchMap usage in effects and epics. | | | | 💭 | | | no-unsafe-takeuntil | Disallow applying operators after takeUntil. | ✅ | | | 💭 | | | prefer-observer | Disallow passing separate handlers to subscribe and tap. | | 🔧 | 💡 | 💭 | | | suffix-subjects | Enforce the use of a suffix in subject identifiers. | | | | 💭 | | | throw-error | Enforce passing only Error values to error notifications. | | | | 💭 | |