Skip to content

Commit fca768c

Browse files
refactor(prefer-root-operators): rename rule
Import isn't accurate because the rule also covers exports too.
1 parent cedc593 commit fca768c

File tree

5 files changed

+52
-52
lines changed

5 files changed

+52
-52
lines changed

README.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -64,50 +64,50 @@ The package includes the following rules.
6464
💭 Requires [type information](https://typescript-eslint.io/linting/typed-linting).\
6565
❌ Deprecated.
6666

67-
| Name                         | Description | 💼 | 🔧 | 💡 | 💭 ||
68-
| :------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- | :- | :- | :- | :- | :- |
69-
| [ban-observables](docs/rules/ban-observables.md) | Disallow banned observable creators. | | | | | |
70-
| [ban-operators](docs/rules/ban-operators.md) | Disallow banned operators. | | | | 💭 | |
71-
| [finnish](docs/rules/finnish.md) | Enforce Finnish notation. | | | | 💭 | |
72-
| [just](docs/rules/just.md) | Require the use of `just` instead of `of`. | | 🔧 | | | |
73-
| [macro](docs/rules/macro.md) | Require the use of the RxJS Tools Babel macro. | | 🔧 | | ||
74-
| [no-async-subscribe](docs/rules/no-async-subscribe.md) | Disallow passing `async` functions to `subscribe`. || | | 💭 | |
75-
| [no-compat](docs/rules/no-compat.md) | Disallow the `rxjs-compat` package. | | | | ||
76-
| [no-connectable](docs/rules/no-connectable.md) | Disallow operators that return connectable observables. | | | | 💭 | |
77-
| [no-create](docs/rules/no-create.md) | Disallow the static `Observable.create` function. || | | 💭 | |
78-
| [no-cyclic-action](docs/rules/no-cyclic-action.md) | Disallow cyclic actions in effects and epics. | | | | 💭 | |
79-
| [no-explicit-generics](docs/rules/no-explicit-generics.md) | Disallow unnecessary explicit generic type arguments. | | | | | |
80-
| [no-exposed-subjects](docs/rules/no-exposed-subjects.md) | Disallow public and protected subjects. | | | | 💭 | |
81-
| [no-finnish](docs/rules/no-finnish.md) | Disallow Finnish notation. | | | | 💭 | |
82-
| [no-ignored-default-value](docs/rules/no-ignored-default-value.md) | Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value. | | | | 💭 | |
83-
| [no-ignored-error](docs/rules/no-ignored-error.md) | Disallow calling `subscribe` without specifying an error handler. | | | | 💭 | |
84-
| [no-ignored-notifier](docs/rules/no-ignored-notifier.md) | Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier. || | | 💭 | |
85-
| [no-ignored-observable](docs/rules/no-ignored-observable.md) | Disallow ignoring observables returned by functions. | | | | 💭 | |
86-
| [no-ignored-replay-buffer](docs/rules/no-ignored-replay-buffer.md) | Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size. || | | | |
87-
| [no-ignored-subscribe](docs/rules/no-ignored-subscribe.md) | Disallow calling `subscribe` without specifying arguments. | | | | 💭 | |
88-
| [no-ignored-subscription](docs/rules/no-ignored-subscription.md) | Disallow ignoring the subscription returned by `subscribe`. | | | | 💭 | |
89-
| [no-ignored-takewhile-value](docs/rules/no-ignored-takewhile-value.md) | Disallow ignoring the value within `takeWhile`. || | | | |
90-
| [no-implicit-any-catch](docs/rules/no-implicit-any-catch.md) | Disallow implicit `any` error parameters in `catchError` operators. || 🔧 | 💡 | 💭 | |
91-
| [no-index](docs/rules/no-index.md) | Disallow importing index modules. || | | | |
92-
| [no-internal](docs/rules/no-internal.md) | Disallow importing internal modules. || 🔧 | 💡 | | |
93-
| [no-nested-subscribe](docs/rules/no-nested-subscribe.md) | Disallow calling `subscribe` within a `subscribe` callback. || | | 💭 | |
94-
| [no-redundant-notify](docs/rules/no-redundant-notify.md) | Disallow sending redundant notifications from completed or errored observables. || | | 💭 | |
95-
| [no-sharereplay](docs/rules/no-sharereplay.md) | Disallow unsafe `shareReplay` usage. || | | | |
96-
| [no-subclass](docs/rules/no-subclass.md) | Disallow subclassing RxJS classes. | | | | 💭 | |
97-
| [no-subject-unsubscribe](docs/rules/no-subject-unsubscribe.md) | Disallow calling the `unsubscribe` method of subjects. || | | 💭 | |
98-
| [no-subject-value](docs/rules/no-subject-value.md) | Disallow accessing the `value` property of a `BehaviorSubject` instance. | | | | 💭 | |
99-
| [no-subscribe-handlers](docs/rules/no-subscribe-handlers.md) | Disallow passing handlers to `subscribe`. | | | | 💭 | |
100-
| [no-tap](docs/rules/no-tap.md) | Disallow the `tap` operator. | | | | ||
101-
| [no-topromise](docs/rules/no-topromise.md) | Disallow use of the `toPromise` method. | | | 💡 | 💭 | |
102-
| [no-unbound-methods](docs/rules/no-unbound-methods.md) | Disallow passing unbound methods. || | | 💭 | |
103-
| [no-unsafe-catch](docs/rules/no-unsafe-catch.md) | Disallow unsafe `catchError` usage in effects and epics. | | | | 💭 | |
104-
| [no-unsafe-first](docs/rules/no-unsafe-first.md) | Disallow unsafe `first`/`take` usage in effects and epics. | | | | 💭 | |
105-
| [no-unsafe-subject-next](docs/rules/no-unsafe-subject-next.md) | Disallow unsafe optional `next` calls. || | | 💭 | |
106-
| [no-unsafe-switchmap](docs/rules/no-unsafe-switchmap.md) | Disallow unsafe `switchMap` usage in effects and epics. | | | | 💭 | |
107-
| [no-unsafe-takeuntil](docs/rules/no-unsafe-takeuntil.md) | Disallow applying operators after `takeUntil`. || | | 💭 | |
108-
| [prefer-import-root-operators](docs/rules/prefer-import-root-operators.md) | Disallow importing operators from `rxjs/operators`. | | 🔧 | 💡 | | |
109-
| [prefer-observer](docs/rules/prefer-observer.md) | Disallow passing separate handlers to `subscribe` and `tap`. | | 🔧 | 💡 | 💭 | |
110-
| [suffix-subjects](docs/rules/suffix-subjects.md) | Enforce the use of a suffix in subject identifiers. | | | | 💭 | |
111-
| [throw-error](docs/rules/throw-error.md) | Enforce passing only `Error` values to `throwError`. | | | | 💭 | |
67+
| Name                       | Description | 💼 | 🔧 | 💡 | 💭 ||
68+
| :--------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- | :- | :- | :- | :- | :- |
69+
| [ban-observables](docs/rules/ban-observables.md) | Disallow banned observable creators. | | | | | |
70+
| [ban-operators](docs/rules/ban-operators.md) | Disallow banned operators. | | | | 💭 | |
71+
| [finnish](docs/rules/finnish.md) | Enforce Finnish notation. | | | | 💭 | |
72+
| [just](docs/rules/just.md) | Require the use of `just` instead of `of`. | | 🔧 | | | |
73+
| [macro](docs/rules/macro.md) | Require the use of the RxJS Tools Babel macro. | | 🔧 | | ||
74+
| [no-async-subscribe](docs/rules/no-async-subscribe.md) | Disallow passing `async` functions to `subscribe`. || | | 💭 | |
75+
| [no-compat](docs/rules/no-compat.md) | Disallow the `rxjs-compat` package. | | | | ||
76+
| [no-connectable](docs/rules/no-connectable.md) | Disallow operators that return connectable observables. | | | | 💭 | |
77+
| [no-create](docs/rules/no-create.md) | Disallow the static `Observable.create` function. || | | 💭 | |
78+
| [no-cyclic-action](docs/rules/no-cyclic-action.md) | Disallow cyclic actions in effects and epics. | | | | 💭 | |
79+
| [no-explicit-generics](docs/rules/no-explicit-generics.md) | Disallow unnecessary explicit generic type arguments. | | | | | |
80+
| [no-exposed-subjects](docs/rules/no-exposed-subjects.md) | Disallow public and protected subjects. | | | | 💭 | |
81+
| [no-finnish](docs/rules/no-finnish.md) | Disallow Finnish notation. | | | | 💭 | |
82+
| [no-ignored-default-value](docs/rules/no-ignored-default-value.md) | Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value. | | | | 💭 | |
83+
| [no-ignored-error](docs/rules/no-ignored-error.md) | Disallow calling `subscribe` without specifying an error handler. | | | | 💭 | |
84+
| [no-ignored-notifier](docs/rules/no-ignored-notifier.md) | Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier. || | | 💭 | |
85+
| [no-ignored-observable](docs/rules/no-ignored-observable.md) | Disallow ignoring observables returned by functions. | | | | 💭 | |
86+
| [no-ignored-replay-buffer](docs/rules/no-ignored-replay-buffer.md) | Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size. || | | | |
87+
| [no-ignored-subscribe](docs/rules/no-ignored-subscribe.md) | Disallow calling `subscribe` without specifying arguments. | | | | 💭 | |
88+
| [no-ignored-subscription](docs/rules/no-ignored-subscription.md) | Disallow ignoring the subscription returned by `subscribe`. | | | | 💭 | |
89+
| [no-ignored-takewhile-value](docs/rules/no-ignored-takewhile-value.md) | Disallow ignoring the value within `takeWhile`. || | | | |
90+
| [no-implicit-any-catch](docs/rules/no-implicit-any-catch.md) | Disallow implicit `any` error parameters in `catchError` operators. || 🔧 | 💡 | 💭 | |
91+
| [no-index](docs/rules/no-index.md) | Disallow importing index modules. || | | | |
92+
| [no-internal](docs/rules/no-internal.md) | Disallow importing internal modules. || 🔧 | 💡 | | |
93+
| [no-nested-subscribe](docs/rules/no-nested-subscribe.md) | Disallow calling `subscribe` within a `subscribe` callback. || | | 💭 | |
94+
| [no-redundant-notify](docs/rules/no-redundant-notify.md) | Disallow sending redundant notifications from completed or errored observables. || | | 💭 | |
95+
| [no-sharereplay](docs/rules/no-sharereplay.md) | Disallow unsafe `shareReplay` usage. || | | | |
96+
| [no-subclass](docs/rules/no-subclass.md) | Disallow subclassing RxJS classes. | | | | 💭 | |
97+
| [no-subject-unsubscribe](docs/rules/no-subject-unsubscribe.md) | Disallow calling the `unsubscribe` method of subjects. || | | 💭 | |
98+
| [no-subject-value](docs/rules/no-subject-value.md) | Disallow accessing the `value` property of a `BehaviorSubject` instance. | | | | 💭 | |
99+
| [no-subscribe-handlers](docs/rules/no-subscribe-handlers.md) | Disallow passing handlers to `subscribe`. | | | | 💭 | |
100+
| [no-tap](docs/rules/no-tap.md) | Disallow the `tap` operator. | | | | ||
101+
| [no-topromise](docs/rules/no-topromise.md) | Disallow use of the `toPromise` method. | | | 💡 | 💭 | |
102+
| [no-unbound-methods](docs/rules/no-unbound-methods.md) | Disallow passing unbound methods. || | | 💭 | |
103+
| [no-unsafe-catch](docs/rules/no-unsafe-catch.md) | Disallow unsafe `catchError` usage in effects and epics. | | | | 💭 | |
104+
| [no-unsafe-first](docs/rules/no-unsafe-first.md) | Disallow unsafe `first`/`take` usage in effects and epics. | | | | 💭 | |
105+
| [no-unsafe-subject-next](docs/rules/no-unsafe-subject-next.md) | Disallow unsafe optional `next` calls. || | | 💭 | |
106+
| [no-unsafe-switchmap](docs/rules/no-unsafe-switchmap.md) | Disallow unsafe `switchMap` usage in effects and epics. | | | | 💭 | |
107+
| [no-unsafe-takeuntil](docs/rules/no-unsafe-takeuntil.md) | Disallow applying operators after `takeUntil`. || | | 💭 | |
108+
| [prefer-observer](docs/rules/prefer-observer.md) | Disallow passing separate handlers to `subscribe` and `tap`. | | 🔧 | 💡 | 💭 | |
109+
| [prefer-root-operators](docs/rules/prefer-root-operators.md) | Disallow importing operators from `rxjs/operators`. | | 🔧 | 💡 | | |
110+
| [suffix-subjects](docs/rules/suffix-subjects.md) | Enforce the use of a suffix in subject identifiers. | | | | 💭 | |
111+
| [throw-error](docs/rules/throw-error.md) | Enforce passing only `Error` values to `throwError`. | | | | 💭 | |
112112

113113
<!-- end auto-generated rules list -->

docs/rules/prefer-import-root-operators.md renamed to docs/rules/prefer-root-operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Disallow importing operators from `rxjs/operators` (`rxjs-x/prefer-import-root-operators`)
1+
# Disallow importing operators from `rxjs/operators` (`rxjs-x/prefer-root-operators`)
22

33
🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
44

0 commit comments

Comments
 (0)