eslint-plugin-rxjs-x 0.3.2 β 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -51
- package/dist/index.d.mts +38 -3
- package/dist/index.d.ts +38 -3
- package/dist/index.js +79 -22
- package/dist/index.mjs +79 -22
- package/docs/rules/no-async-subscribe.md +1 -1
- package/docs/rules/no-create.md +1 -1
- package/docs/rules/no-explicit-generics.md +2 -0
- package/docs/rules/no-exposed-subjects.md +2 -0
- package/docs/rules/no-ignored-default-value.md +2 -0
- package/docs/rules/no-ignored-error.md +2 -0
- package/docs/rules/no-ignored-notifier.md +1 -1
- package/docs/rules/no-ignored-observable.md +2 -0
- package/docs/rules/no-ignored-replay-buffer.md +1 -1
- package/docs/rules/no-ignored-takewhile-value.md +1 -1
- package/docs/rules/no-implicit-any-catch.md +3 -3
- package/docs/rules/no-index.md +1 -1
- package/docs/rules/no-internal.md +1 -1
- package/docs/rules/no-nested-subscribe.md +1 -1
- package/docs/rules/no-redundant-notify.md +1 -1
- package/docs/rules/no-sharereplay.md +1 -1
- package/docs/rules/no-subclass.md +2 -0
- package/docs/rules/no-subject-unsubscribe.md +1 -1
- package/docs/rules/no-topromise.md +2 -0
- package/docs/rules/no-unbound-methods.md +1 -1
- package/docs/rules/no-unsafe-subject-next.md +1 -1
- package/docs/rules/no-unsafe-takeuntil.md +1 -1
- package/docs/rules/prefer-observer.md +6 -0
- package/docs/rules/prefer-root-operators.md +2 -0
- package/docs/rules/throw-error.md +2 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -3,15 +3,22 @@
|
|
|
3
3
|
[](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/master/LICENSE)
|
|
4
4
|
[](https://www.npmjs.com/package/eslint-plugin-rxjs-x)
|
|
5
5
|
|
|
6
|
-
This
|
|
7
|
-
|
|
6
|
+
This ESLint plugin is intended to prevent issues with [RxJS](https://github.com/ReactiveX/rxjs).
|
|
7
|
+
|
|
8
|
+
Most of these rules require TypeScript typed linting and are indicated as such below.
|
|
9
|
+
|
|
10
|
+
## Migrating from `eslint-plugin-rxjs`
|
|
11
|
+
|
|
12
|
+
This project is a fork of [`eslint-plugin-rxjs`](https://github.com/cartant/eslint-plugin-rxjs)
|
|
8
13
|
initially started to support the new ESLint flat config format.
|
|
9
|
-
|
|
10
|
-
(The Angular-specific rules in `rxjs-tslint-rules` have been re-implemented in [`eslint-plugin-rxjs-angular`](https://github.com/cartant/eslint-plugin-rxjs-angular).)
|
|
14
|
+
There are some breaking changes:
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
- The old `.eslintrc` format is not supported.
|
|
17
|
+
- If you need to continue using this old format, use the original `eslint-plugin-rxjs` or a different fork.
|
|
18
|
+
- The plugin namespace specified in the `recommended` config was changed from `rxjs` to `rxjs-x`.
|
|
19
|
+
- e.g. In your ESLint config, `rxjs/no-subject-value` should be renamed to `rxjs-x/no-subject-value`.
|
|
13
20
|
|
|
14
|
-
|
|
21
|
+
A complete description of all changes are documented in the [CHANGELOG](CHANGELOG.md) file.
|
|
15
22
|
|
|
16
23
|
## Install
|
|
17
24
|
|
|
@@ -48,6 +55,7 @@ See [Linting with Type Information](https://typescript-eslint.io/getting-started
|
|
|
48
55
|
| | Name |
|
|
49
56
|
| :- | :------------ |
|
|
50
57
|
| β
| `recommended` |
|
|
58
|
+
| π | `strict` |
|
|
51
59
|
|
|
52
60
|
<!-- end auto-generated configs list -->
|
|
53
61
|
|
|
@@ -59,55 +67,56 @@ The package includes the following rules.
|
|
|
59
67
|
|
|
60
68
|
πΌ Configurations enabled in.\
|
|
61
69
|
β
Set in the `recommended` configuration.\
|
|
70
|
+
π Set in the `strict` configuration.\
|
|
62
71
|
π§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
|
|
63
72
|
π‘ Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\
|
|
64
73
|
π Requires [type information](https://typescript-eslint.io/linting/typed-linting).\
|
|
65
74
|
β Deprecated.
|
|
66
75
|
|
|
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`. |
|
|
76
|
+
| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | Description | πΌ | π§ | π‘ | π | β |
|
|
77
|
+
| :--------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- | :--- | :- | :- | :- | :- |
|
|
78
|
+
| [ban-observables](docs/rules/ban-observables.md) | Disallow banned observable creators. | | | | | |
|
|
79
|
+
| [ban-operators](docs/rules/ban-operators.md) | Disallow banned operators. | | | | π | |
|
|
80
|
+
| [finnish](docs/rules/finnish.md) | Enforce Finnish notation. | | | | π | |
|
|
81
|
+
| [just](docs/rules/just.md) | Require the use of `just` instead of `of`. | | π§ | | | |
|
|
82
|
+
| [macro](docs/rules/macro.md) | Require the use of the RxJS Tools Babel macro. | | π§ | | | β |
|
|
83
|
+
| [no-async-subscribe](docs/rules/no-async-subscribe.md) | Disallow passing `async` functions to `subscribe`. | β
π | | | π | |
|
|
84
|
+
| [no-compat](docs/rules/no-compat.md) | Disallow the `rxjs-compat` package. | | | | | β |
|
|
85
|
+
| [no-connectable](docs/rules/no-connectable.md) | Disallow operators that return connectable observables. | | | | π | |
|
|
86
|
+
| [no-create](docs/rules/no-create.md) | Disallow the static `Observable.create` function. | β
π | | | π | |
|
|
87
|
+
| [no-cyclic-action](docs/rules/no-cyclic-action.md) | Disallow cyclic actions in effects and epics. | | | | π | |
|
|
88
|
+
| [no-explicit-generics](docs/rules/no-explicit-generics.md) | Disallow unnecessary explicit generic type arguments. | π | | | | |
|
|
89
|
+
| [no-exposed-subjects](docs/rules/no-exposed-subjects.md) | Disallow public and protected subjects. | π | | | π | |
|
|
90
|
+
| [no-finnish](docs/rules/no-finnish.md) | Disallow Finnish notation. | | | | π | |
|
|
91
|
+
| [no-ignored-default-value](docs/rules/no-ignored-default-value.md) | Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value. | π | | | π | |
|
|
92
|
+
| [no-ignored-error](docs/rules/no-ignored-error.md) | Disallow calling `subscribe` without specifying an error handler. | π | | | π | |
|
|
93
|
+
| [no-ignored-notifier](docs/rules/no-ignored-notifier.md) | Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier. | β
π | | | π | |
|
|
94
|
+
| [no-ignored-observable](docs/rules/no-ignored-observable.md) | Disallow ignoring observables returned by functions. | π | | | π | |
|
|
95
|
+
| [no-ignored-replay-buffer](docs/rules/no-ignored-replay-buffer.md) | Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size. | β
π | | | | |
|
|
96
|
+
| [no-ignored-subscribe](docs/rules/no-ignored-subscribe.md) | Disallow calling `subscribe` without specifying arguments. | | | | π | |
|
|
97
|
+
| [no-ignored-subscription](docs/rules/no-ignored-subscription.md) | Disallow ignoring the subscription returned by `subscribe`. | | | | π | |
|
|
98
|
+
| [no-ignored-takewhile-value](docs/rules/no-ignored-takewhile-value.md) | Disallow ignoring the value within `takeWhile`. | β
π | | | | |
|
|
99
|
+
| [no-implicit-any-catch](docs/rules/no-implicit-any-catch.md) | Disallow implicit `any` error parameters in `catchError` operators. | β
π | π§ | π‘ | π | |
|
|
100
|
+
| [no-index](docs/rules/no-index.md) | Disallow importing index modules. | β
π | | | | |
|
|
101
|
+
| [no-internal](docs/rules/no-internal.md) | Disallow importing internal modules. | β
π | π§ | π‘ | | |
|
|
102
|
+
| [no-nested-subscribe](docs/rules/no-nested-subscribe.md) | Disallow calling `subscribe` within a `subscribe` callback. | β
π | | | π | |
|
|
103
|
+
| [no-redundant-notify](docs/rules/no-redundant-notify.md) | Disallow sending redundant notifications from completed or errored observables. | β
π | | | π | |
|
|
104
|
+
| [no-sharereplay](docs/rules/no-sharereplay.md) | Disallow unsafe `shareReplay` usage. | β
π | | | | |
|
|
105
|
+
| [no-subclass](docs/rules/no-subclass.md) | Disallow subclassing RxJS classes. | π | | | π | |
|
|
106
|
+
| [no-subject-unsubscribe](docs/rules/no-subject-unsubscribe.md) | Disallow calling the `unsubscribe` method of subjects. | β
π | | | π | |
|
|
107
|
+
| [no-subject-value](docs/rules/no-subject-value.md) | Disallow accessing the `value` property of a `BehaviorSubject` instance. | | | | π | |
|
|
108
|
+
| [no-subscribe-handlers](docs/rules/no-subscribe-handlers.md) | Disallow passing handlers to `subscribe`. | | | | π | |
|
|
109
|
+
| [no-tap](docs/rules/no-tap.md) | Disallow the `tap` operator. | | | | | β |
|
|
110
|
+
| [no-topromise](docs/rules/no-topromise.md) | Disallow use of the `toPromise` method. | π | | π‘ | π | |
|
|
111
|
+
| [no-unbound-methods](docs/rules/no-unbound-methods.md) | Disallow passing unbound methods. | β
π | | | π | |
|
|
112
|
+
| [no-unsafe-catch](docs/rules/no-unsafe-catch.md) | Disallow unsafe `catchError` usage in effects and epics. | | | | π | |
|
|
113
|
+
| [no-unsafe-first](docs/rules/no-unsafe-first.md) | Disallow unsafe `first`/`take` usage in effects and epics. | | | | π | |
|
|
114
|
+
| [no-unsafe-subject-next](docs/rules/no-unsafe-subject-next.md) | Disallow unsafe optional `next` calls. | β
π | | | π | |
|
|
115
|
+
| [no-unsafe-switchmap](docs/rules/no-unsafe-switchmap.md) | Disallow unsafe `switchMap` usage in effects and epics. | | | | π | |
|
|
116
|
+
| [no-unsafe-takeuntil](docs/rules/no-unsafe-takeuntil.md) | Disallow applying operators after `takeUntil`. | β
π | | | π | |
|
|
117
|
+
| [prefer-observer](docs/rules/prefer-observer.md) | Disallow passing separate handlers to `subscribe` and `tap`. | π | π§ | π‘ | π | |
|
|
118
|
+
| [prefer-root-operators](docs/rules/prefer-root-operators.md) | Disallow importing operators from `rxjs/operators`. | π | π§ | π‘ | | |
|
|
119
|
+
| [suffix-subjects](docs/rules/suffix-subjects.md) | Enforce the use of a suffix in subject identifiers. | | | | π | |
|
|
120
|
+
| [throw-error](docs/rules/throw-error.md) | Enforce passing only `Error` values to `throwError`. | π | | | π | |
|
|
112
121
|
|
|
113
122
|
<!-- end auto-generated rules list -->
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { TSESLint } from '@typescript-eslint/utils';
|
|
|
2
2
|
|
|
3
3
|
interface RxjsXRuleDocs {
|
|
4
4
|
description: string;
|
|
5
|
-
recommended?:
|
|
5
|
+
recommended?: TSESLint.RuleRecommendation | TSESLint.RuleRecommendationAcrossConfigs<unknown[]>;
|
|
6
6
|
requiresTypeChecking?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -23,13 +23,48 @@ declare const rxjsX: {
|
|
|
23
23
|
'rxjs-x/no-internal': "error";
|
|
24
24
|
'rxjs-x/no-nested-subscribe': "error";
|
|
25
25
|
'rxjs-x/no-redundant-notify': "error";
|
|
26
|
-
'rxjs-x/no-sharereplay':
|
|
27
|
-
|
|
26
|
+
'rxjs-x/no-sharereplay': "error";
|
|
27
|
+
'rxjs-x/no-subject-unsubscribe': "error";
|
|
28
|
+
'rxjs-x/no-unbound-methods': "error";
|
|
29
|
+
'rxjs-x/no-unsafe-subject-next': "error";
|
|
30
|
+
'rxjs-x/no-unsafe-takeuntil': "error";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
strict: {
|
|
34
|
+
plugins: {
|
|
35
|
+
'rxjs-x': TSESLint.FlatConfig.Plugin;
|
|
36
|
+
};
|
|
37
|
+
rules: {
|
|
38
|
+
'rxjs-x/no-async-subscribe': "error";
|
|
39
|
+
'rxjs-x/no-create': "error";
|
|
40
|
+
'rxjs-x/no-explicit-generics': "error";
|
|
41
|
+
'rxjs-x/no-exposed-subjects': "error";
|
|
42
|
+
'rxjs-x/no-ignored-default-value': "error";
|
|
43
|
+
'rxjs-x/no-ignored-error': "error";
|
|
44
|
+
'rxjs-x/no-ignored-notifier': "error";
|
|
45
|
+
'rxjs-x/no-ignored-observable': "error";
|
|
46
|
+
'rxjs-x/no-ignored-replay-buffer': "error";
|
|
47
|
+
'rxjs-x/no-ignored-takewhile-value': "error";
|
|
48
|
+
'rxjs-x/no-implicit-any-catch': ["error", {
|
|
49
|
+
allowExplicitAny: false;
|
|
28
50
|
}];
|
|
51
|
+
'rxjs-x/no-index': "error";
|
|
52
|
+
'rxjs-x/no-internal': "error";
|
|
53
|
+
'rxjs-x/no-nested-subscribe': "error";
|
|
54
|
+
'rxjs-x/no-redundant-notify': "error";
|
|
55
|
+
'rxjs-x/no-sharereplay': "error";
|
|
56
|
+
'rxjs-x/no-subclass': "error";
|
|
29
57
|
'rxjs-x/no-subject-unsubscribe': "error";
|
|
58
|
+
'rxjs-x/no-topromise': "error";
|
|
30
59
|
'rxjs-x/no-unbound-methods': "error";
|
|
31
60
|
'rxjs-x/no-unsafe-subject-next': "error";
|
|
32
61
|
'rxjs-x/no-unsafe-takeuntil': "error";
|
|
62
|
+
'rxjs-x/prefer-observer': "error";
|
|
63
|
+
'rxjs-x/prefer-root-operators': "error";
|
|
64
|
+
'rxjs-x/throw-error': ["error", {
|
|
65
|
+
allowThrowingAny: false;
|
|
66
|
+
allowThrowingUnknown: false;
|
|
67
|
+
}];
|
|
33
68
|
};
|
|
34
69
|
};
|
|
35
70
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TSESLint } from '@typescript-eslint/utils';
|
|
|
2
2
|
|
|
3
3
|
interface RxjsXRuleDocs {
|
|
4
4
|
description: string;
|
|
5
|
-
recommended?:
|
|
5
|
+
recommended?: TSESLint.RuleRecommendation | TSESLint.RuleRecommendationAcrossConfigs<unknown[]>;
|
|
6
6
|
requiresTypeChecking?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -23,13 +23,48 @@ declare const rxjsX: {
|
|
|
23
23
|
'rxjs-x/no-internal': "error";
|
|
24
24
|
'rxjs-x/no-nested-subscribe': "error";
|
|
25
25
|
'rxjs-x/no-redundant-notify': "error";
|
|
26
|
-
'rxjs-x/no-sharereplay':
|
|
27
|
-
|
|
26
|
+
'rxjs-x/no-sharereplay': "error";
|
|
27
|
+
'rxjs-x/no-subject-unsubscribe': "error";
|
|
28
|
+
'rxjs-x/no-unbound-methods': "error";
|
|
29
|
+
'rxjs-x/no-unsafe-subject-next': "error";
|
|
30
|
+
'rxjs-x/no-unsafe-takeuntil': "error";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
strict: {
|
|
34
|
+
plugins: {
|
|
35
|
+
'rxjs-x': TSESLint.FlatConfig.Plugin;
|
|
36
|
+
};
|
|
37
|
+
rules: {
|
|
38
|
+
'rxjs-x/no-async-subscribe': "error";
|
|
39
|
+
'rxjs-x/no-create': "error";
|
|
40
|
+
'rxjs-x/no-explicit-generics': "error";
|
|
41
|
+
'rxjs-x/no-exposed-subjects': "error";
|
|
42
|
+
'rxjs-x/no-ignored-default-value': "error";
|
|
43
|
+
'rxjs-x/no-ignored-error': "error";
|
|
44
|
+
'rxjs-x/no-ignored-notifier': "error";
|
|
45
|
+
'rxjs-x/no-ignored-observable': "error";
|
|
46
|
+
'rxjs-x/no-ignored-replay-buffer': "error";
|
|
47
|
+
'rxjs-x/no-ignored-takewhile-value': "error";
|
|
48
|
+
'rxjs-x/no-implicit-any-catch': ["error", {
|
|
49
|
+
allowExplicitAny: false;
|
|
28
50
|
}];
|
|
51
|
+
'rxjs-x/no-index': "error";
|
|
52
|
+
'rxjs-x/no-internal': "error";
|
|
53
|
+
'rxjs-x/no-nested-subscribe': "error";
|
|
54
|
+
'rxjs-x/no-redundant-notify': "error";
|
|
55
|
+
'rxjs-x/no-sharereplay': "error";
|
|
56
|
+
'rxjs-x/no-subclass': "error";
|
|
29
57
|
'rxjs-x/no-subject-unsubscribe': "error";
|
|
58
|
+
'rxjs-x/no-topromise': "error";
|
|
30
59
|
'rxjs-x/no-unbound-methods': "error";
|
|
31
60
|
'rxjs-x/no-unsafe-subject-next': "error";
|
|
32
61
|
'rxjs-x/no-unsafe-takeuntil': "error";
|
|
62
|
+
'rxjs-x/prefer-observer': "error";
|
|
63
|
+
'rxjs-x/prefer-root-operators': "error";
|
|
64
|
+
'rxjs-x/throw-error': ["error", {
|
|
65
|
+
allowThrowingAny: false;
|
|
66
|
+
allowThrowingUnknown: false;
|
|
67
|
+
}];
|
|
33
68
|
};
|
|
34
69
|
};
|
|
35
70
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// package.json
|
|
2
2
|
var name = "eslint-plugin-rxjs-x";
|
|
3
|
-
var version = "0.
|
|
3
|
+
var version = "0.4.1";
|
|
4
4
|
|
|
5
5
|
// src/configs/recommended.ts
|
|
6
6
|
var createRecommendedConfig = (plugin2) => ({
|
|
@@ -18,7 +18,7 @@ var createRecommendedConfig = (plugin2) => ({
|
|
|
18
18
|
"rxjs-x/no-internal": "error",
|
|
19
19
|
"rxjs-x/no-nested-subscribe": "error",
|
|
20
20
|
"rxjs-x/no-redundant-notify": "error",
|
|
21
|
-
"rxjs-x/no-sharereplay":
|
|
21
|
+
"rxjs-x/no-sharereplay": "error",
|
|
22
22
|
"rxjs-x/no-subject-unsubscribe": "error",
|
|
23
23
|
"rxjs-x/no-unbound-methods": "error",
|
|
24
24
|
"rxjs-x/no-unsafe-subject-next": "error",
|
|
@@ -26,6 +26,45 @@ var createRecommendedConfig = (plugin2) => ({
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
// src/configs/strict.ts
|
|
30
|
+
var createStrictConfig = (plugin2) => ({
|
|
31
|
+
plugins: {
|
|
32
|
+
"rxjs-x": plugin2
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
"rxjs-x/no-async-subscribe": "error",
|
|
36
|
+
"rxjs-x/no-create": "error",
|
|
37
|
+
"rxjs-x/no-explicit-generics": "error",
|
|
38
|
+
"rxjs-x/no-exposed-subjects": "error",
|
|
39
|
+
"rxjs-x/no-ignored-default-value": "error",
|
|
40
|
+
"rxjs-x/no-ignored-error": "error",
|
|
41
|
+
"rxjs-x/no-ignored-notifier": "error",
|
|
42
|
+
"rxjs-x/no-ignored-observable": "error",
|
|
43
|
+
"rxjs-x/no-ignored-replay-buffer": "error",
|
|
44
|
+
"rxjs-x/no-ignored-takewhile-value": "error",
|
|
45
|
+
"rxjs-x/no-implicit-any-catch": ["error", {
|
|
46
|
+
allowExplicitAny: false
|
|
47
|
+
}],
|
|
48
|
+
"rxjs-x/no-index": "error",
|
|
49
|
+
"rxjs-x/no-internal": "error",
|
|
50
|
+
"rxjs-x/no-nested-subscribe": "error",
|
|
51
|
+
"rxjs-x/no-redundant-notify": "error",
|
|
52
|
+
"rxjs-x/no-sharereplay": "error",
|
|
53
|
+
"rxjs-x/no-subclass": "error",
|
|
54
|
+
"rxjs-x/no-subject-unsubscribe": "error",
|
|
55
|
+
"rxjs-x/no-topromise": "error",
|
|
56
|
+
"rxjs-x/no-unbound-methods": "error",
|
|
57
|
+
"rxjs-x/no-unsafe-subject-next": "error",
|
|
58
|
+
"rxjs-x/no-unsafe-takeuntil": "error",
|
|
59
|
+
"rxjs-x/prefer-observer": "error",
|
|
60
|
+
"rxjs-x/prefer-root-operators": "error",
|
|
61
|
+
"rxjs-x/throw-error": ["error", {
|
|
62
|
+
allowThrowingAny: false,
|
|
63
|
+
allowThrowingUnknown: false
|
|
64
|
+
}]
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
29
68
|
// src/rules/ban-observables.ts
|
|
30
69
|
var _utils = require('@typescript-eslint/utils');
|
|
31
70
|
var _commontags = require('common-tags');
|
|
@@ -782,7 +821,7 @@ var noAsyncSubscribeRule = ruleCreator({
|
|
|
782
821
|
meta: {
|
|
783
822
|
docs: {
|
|
784
823
|
description: "Disallow passing `async` functions to `subscribe`.",
|
|
785
|
-
recommended:
|
|
824
|
+
recommended: "recommended",
|
|
786
825
|
requiresTypeChecking: true
|
|
787
826
|
},
|
|
788
827
|
messages: {
|
|
@@ -890,7 +929,7 @@ var noCreateRule = ruleCreator({
|
|
|
890
929
|
meta: {
|
|
891
930
|
docs: {
|
|
892
931
|
description: "Disallow the static `Observable.create` function.",
|
|
893
|
-
recommended:
|
|
932
|
+
recommended: "recommended",
|
|
894
933
|
requiresTypeChecking: true
|
|
895
934
|
},
|
|
896
935
|
messages: {
|
|
@@ -1032,7 +1071,8 @@ var noExplicitGenericsRule = ruleCreator({
|
|
|
1032
1071
|
defaultOptions: [],
|
|
1033
1072
|
meta: {
|
|
1034
1073
|
docs: {
|
|
1035
|
-
description: "Disallow unnecessary explicit generic type arguments."
|
|
1074
|
+
description: "Disallow unnecessary explicit generic type arguments.",
|
|
1075
|
+
recommended: "strict"
|
|
1036
1076
|
},
|
|
1037
1077
|
messages: {
|
|
1038
1078
|
forbidden: "Explicit generic type arguments are forbidden."
|
|
@@ -1085,6 +1125,7 @@ var noExposedSubjectsRule = ruleCreator({
|
|
|
1085
1125
|
meta: {
|
|
1086
1126
|
docs: {
|
|
1087
1127
|
description: "Disallow public and protected subjects.",
|
|
1128
|
+
recommended: "strict",
|
|
1088
1129
|
requiresTypeChecking: true
|
|
1089
1130
|
},
|
|
1090
1131
|
messages: {
|
|
@@ -1284,6 +1325,7 @@ var noIgnoredDefaultValueRule = ruleCreator({
|
|
|
1284
1325
|
meta: {
|
|
1285
1326
|
docs: {
|
|
1286
1327
|
description: "Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value.",
|
|
1328
|
+
recommended: "strict",
|
|
1287
1329
|
requiresTypeChecking: true
|
|
1288
1330
|
},
|
|
1289
1331
|
messages: {
|
|
@@ -1386,6 +1428,7 @@ var noIgnoredErrorRule = ruleCreator({
|
|
|
1386
1428
|
meta: {
|
|
1387
1429
|
docs: {
|
|
1388
1430
|
description: "Disallow calling `subscribe` without specifying an error handler.",
|
|
1431
|
+
recommended: "strict",
|
|
1389
1432
|
requiresTypeChecking: true
|
|
1390
1433
|
},
|
|
1391
1434
|
messages: {
|
|
@@ -1450,7 +1493,7 @@ var noIgnoredNotifierRule = ruleCreator({
|
|
|
1450
1493
|
meta: {
|
|
1451
1494
|
docs: {
|
|
1452
1495
|
description: "Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier.",
|
|
1453
|
-
recommended:
|
|
1496
|
+
recommended: "recommended",
|
|
1454
1497
|
requiresTypeChecking: true
|
|
1455
1498
|
},
|
|
1456
1499
|
messages: {
|
|
@@ -1522,6 +1565,7 @@ var noIgnoredObservableRule = ruleCreator({
|
|
|
1522
1565
|
meta: {
|
|
1523
1566
|
docs: {
|
|
1524
1567
|
description: "Disallow ignoring observables returned by functions.",
|
|
1568
|
+
recommended: "strict",
|
|
1525
1569
|
requiresTypeChecking: true
|
|
1526
1570
|
},
|
|
1527
1571
|
messages: {
|
|
@@ -1552,7 +1596,7 @@ var noIgnoredReplayBufferRule = ruleCreator({
|
|
|
1552
1596
|
meta: {
|
|
1553
1597
|
docs: {
|
|
1554
1598
|
description: "Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size.",
|
|
1555
|
-
recommended:
|
|
1599
|
+
recommended: "recommended"
|
|
1556
1600
|
},
|
|
1557
1601
|
messages: {
|
|
1558
1602
|
forbidden: "Ignoring the buffer size is forbidden."
|
|
@@ -1678,7 +1722,7 @@ var noIgnoredTakewhileValueRule = ruleCreator({
|
|
|
1678
1722
|
meta: {
|
|
1679
1723
|
docs: {
|
|
1680
1724
|
description: "Disallow ignoring the value within `takeWhile`.",
|
|
1681
|
-
recommended:
|
|
1725
|
+
recommended: "recommended"
|
|
1682
1726
|
},
|
|
1683
1727
|
messages: {
|
|
1684
1728
|
forbidden: "Ignoring the value within takeWhile is forbidden."
|
|
@@ -1742,7 +1786,12 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1742
1786
|
meta: {
|
|
1743
1787
|
docs: {
|
|
1744
1788
|
description: "Disallow implicit `any` error parameters in `catchError` operators.",
|
|
1745
|
-
recommended:
|
|
1789
|
+
recommended: {
|
|
1790
|
+
recommended: true,
|
|
1791
|
+
strict: [{
|
|
1792
|
+
allowExplicitAny: false
|
|
1793
|
+
}]
|
|
1794
|
+
},
|
|
1746
1795
|
requiresTypeChecking: true
|
|
1747
1796
|
},
|
|
1748
1797
|
fixable: "code",
|
|
@@ -1760,7 +1809,7 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1760
1809
|
allowExplicitAny: {
|
|
1761
1810
|
type: "boolean",
|
|
1762
1811
|
description: "Allow error variable to be explicitly typed as `any`.",
|
|
1763
|
-
default:
|
|
1812
|
+
default: true
|
|
1764
1813
|
}
|
|
1765
1814
|
},
|
|
1766
1815
|
type: "object"
|
|
@@ -1771,7 +1820,7 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1771
1820
|
name: "no-implicit-any-catch",
|
|
1772
1821
|
create: (context) => {
|
|
1773
1822
|
const [config = {}] = context.options;
|
|
1774
|
-
const { allowExplicitAny =
|
|
1823
|
+
const { allowExplicitAny = true } = config;
|
|
1775
1824
|
const { couldBeObservable } = getTypeServices(context);
|
|
1776
1825
|
const sourceCode = context.sourceCode;
|
|
1777
1826
|
function checkCallback(callback) {
|
|
@@ -1880,7 +1929,7 @@ var noIndexRule = ruleCreator({
|
|
|
1880
1929
|
meta: {
|
|
1881
1930
|
docs: {
|
|
1882
1931
|
description: "Disallow importing index modules.",
|
|
1883
|
-
recommended:
|
|
1932
|
+
recommended: "recommended"
|
|
1884
1933
|
},
|
|
1885
1934
|
messages: {
|
|
1886
1935
|
forbidden: "RxJS imports from index modules are forbidden."
|
|
@@ -1907,7 +1956,7 @@ var noInternalRule = ruleCreator({
|
|
|
1907
1956
|
meta: {
|
|
1908
1957
|
docs: {
|
|
1909
1958
|
description: "Disallow importing internal modules.",
|
|
1910
|
-
recommended:
|
|
1959
|
+
recommended: "recommended"
|
|
1911
1960
|
},
|
|
1912
1961
|
fixable: "code",
|
|
1913
1962
|
hasSuggestions: true,
|
|
@@ -1983,7 +2032,7 @@ var noNestedSubscribeRule = ruleCreator({
|
|
|
1983
2032
|
meta: {
|
|
1984
2033
|
docs: {
|
|
1985
2034
|
description: "Disallow calling `subscribe` within a `subscribe` callback.",
|
|
1986
|
-
recommended:
|
|
2035
|
+
recommended: "recommended",
|
|
1987
2036
|
requiresTypeChecking: true
|
|
1988
2037
|
},
|
|
1989
2038
|
messages: {
|
|
@@ -2027,7 +2076,7 @@ var noRedundantNotifyRule = ruleCreator({
|
|
|
2027
2076
|
meta: {
|
|
2028
2077
|
docs: {
|
|
2029
2078
|
description: "Disallow sending redundant notifications from completed or errored observables.",
|
|
2030
|
-
recommended:
|
|
2079
|
+
recommended: "recommended",
|
|
2031
2080
|
requiresTypeChecking: true
|
|
2032
2081
|
},
|
|
2033
2082
|
messages: {
|
|
@@ -2106,7 +2155,7 @@ var noSharereplayRule = ruleCreator({
|
|
|
2106
2155
|
meta: {
|
|
2107
2156
|
docs: {
|
|
2108
2157
|
description: "Disallow unsafe `shareReplay` usage.",
|
|
2109
|
-
recommended:
|
|
2158
|
+
recommended: "recommended"
|
|
2110
2159
|
},
|
|
2111
2160
|
messages: {
|
|
2112
2161
|
forbidden: "shareReplay is forbidden.",
|
|
@@ -2149,6 +2198,7 @@ var noSubclassRule = ruleCreator({
|
|
|
2149
2198
|
meta: {
|
|
2150
2199
|
docs: {
|
|
2151
2200
|
description: "Disallow subclassing RxJS classes.",
|
|
2201
|
+
recommended: "strict",
|
|
2152
2202
|
requiresTypeChecking: true
|
|
2153
2203
|
},
|
|
2154
2204
|
messages: {
|
|
@@ -2192,7 +2242,7 @@ var noSubjectUnsubscribeRule = ruleCreator({
|
|
|
2192
2242
|
meta: {
|
|
2193
2243
|
docs: {
|
|
2194
2244
|
description: "Disallow calling the `unsubscribe` method of subjects.",
|
|
2195
|
-
recommended:
|
|
2245
|
+
recommended: "recommended",
|
|
2196
2246
|
requiresTypeChecking: true
|
|
2197
2247
|
},
|
|
2198
2248
|
messages: {
|
|
@@ -2335,6 +2385,7 @@ var noTopromiseRule = ruleCreator({
|
|
|
2335
2385
|
meta: {
|
|
2336
2386
|
docs: {
|
|
2337
2387
|
description: "Disallow use of the `toPromise` method.",
|
|
2388
|
+
recommended: "strict",
|
|
2338
2389
|
requiresTypeChecking: true
|
|
2339
2390
|
},
|
|
2340
2391
|
hasSuggestions: true,
|
|
@@ -2429,7 +2480,7 @@ var noUnboundMethodsRule = ruleCreator({
|
|
|
2429
2480
|
meta: {
|
|
2430
2481
|
docs: {
|
|
2431
2482
|
description: "Disallow passing unbound methods.",
|
|
2432
|
-
recommended:
|
|
2483
|
+
recommended: "recommended",
|
|
2433
2484
|
requiresTypeChecking: true
|
|
2434
2485
|
},
|
|
2435
2486
|
messages: {
|
|
@@ -2626,7 +2677,7 @@ var noUnsafeSubjectNext = ruleCreator({
|
|
|
2626
2677
|
meta: {
|
|
2627
2678
|
docs: {
|
|
2628
2679
|
description: "Disallow unsafe optional `next` calls.",
|
|
2629
|
-
recommended:
|
|
2680
|
+
recommended: "recommended",
|
|
2630
2681
|
requiresTypeChecking: true
|
|
2631
2682
|
},
|
|
2632
2683
|
messages: {
|
|
@@ -2827,7 +2878,7 @@ var noUnsafeTakeuntilRule = ruleCreator({
|
|
|
2827
2878
|
meta: {
|
|
2828
2879
|
docs: {
|
|
2829
2880
|
description: "Disallow applying operators after `takeUntil`.",
|
|
2830
|
-
recommended:
|
|
2881
|
+
recommended: "recommended",
|
|
2831
2882
|
requiresTypeChecking: true
|
|
2832
2883
|
},
|
|
2833
2884
|
messages: {
|
|
@@ -2908,6 +2959,7 @@ var preferObserverRule = ruleCreator({
|
|
|
2908
2959
|
meta: {
|
|
2909
2960
|
docs: {
|
|
2910
2961
|
description: "Disallow passing separate handlers to `subscribe` and `tap`.",
|
|
2962
|
+
recommended: "strict",
|
|
2911
2963
|
requiresTypeChecking: true
|
|
2912
2964
|
},
|
|
2913
2965
|
fixable: "code",
|
|
@@ -3016,7 +3068,8 @@ var preferRootOperatorsRule = ruleCreator({
|
|
|
3016
3068
|
defaultOptions: [],
|
|
3017
3069
|
meta: {
|
|
3018
3070
|
docs: {
|
|
3019
|
-
description: "Disallow importing operators from `rxjs/operators`."
|
|
3071
|
+
description: "Disallow importing operators from `rxjs/operators`.",
|
|
3072
|
+
recommended: "strict"
|
|
3020
3073
|
},
|
|
3021
3074
|
fixable: "code",
|
|
3022
3075
|
hasSuggestions: true,
|
|
@@ -3343,6 +3396,9 @@ var throwErrorRule = ruleCreator({
|
|
|
3343
3396
|
meta: {
|
|
3344
3397
|
docs: {
|
|
3345
3398
|
description: "Enforce passing only `Error` values to `throwError`.",
|
|
3399
|
+
recommended: {
|
|
3400
|
+
strict: [{ allowThrowingAny: false, allowThrowingUnknown: false }]
|
|
3401
|
+
},
|
|
3346
3402
|
requiresTypeChecking: true
|
|
3347
3403
|
},
|
|
3348
3404
|
messages: {
|
|
@@ -3461,7 +3517,8 @@ var plugin = {
|
|
|
3461
3517
|
var rxjsX = {
|
|
3462
3518
|
...plugin,
|
|
3463
3519
|
configs: {
|
|
3464
|
-
recommended: createRecommendedConfig(plugin)
|
|
3520
|
+
recommended: createRecommendedConfig(plugin),
|
|
3521
|
+
strict: createStrictConfig(plugin)
|
|
3465
3522
|
}
|
|
3466
3523
|
};
|
|
3467
3524
|
var src_default = rxjsX;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var name = "eslint-plugin-rxjs-x";
|
|
3
|
-
var version = "0.
|
|
3
|
+
var version = "0.4.1";
|
|
4
4
|
|
|
5
5
|
// src/configs/recommended.ts
|
|
6
6
|
var createRecommendedConfig = (plugin2) => ({
|
|
@@ -18,7 +18,7 @@ var createRecommendedConfig = (plugin2) => ({
|
|
|
18
18
|
"rxjs-x/no-internal": "error",
|
|
19
19
|
"rxjs-x/no-nested-subscribe": "error",
|
|
20
20
|
"rxjs-x/no-redundant-notify": "error",
|
|
21
|
-
"rxjs-x/no-sharereplay":
|
|
21
|
+
"rxjs-x/no-sharereplay": "error",
|
|
22
22
|
"rxjs-x/no-subject-unsubscribe": "error",
|
|
23
23
|
"rxjs-x/no-unbound-methods": "error",
|
|
24
24
|
"rxjs-x/no-unsafe-subject-next": "error",
|
|
@@ -26,6 +26,45 @@ var createRecommendedConfig = (plugin2) => ({
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
// src/configs/strict.ts
|
|
30
|
+
var createStrictConfig = (plugin2) => ({
|
|
31
|
+
plugins: {
|
|
32
|
+
"rxjs-x": plugin2
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
"rxjs-x/no-async-subscribe": "error",
|
|
36
|
+
"rxjs-x/no-create": "error",
|
|
37
|
+
"rxjs-x/no-explicit-generics": "error",
|
|
38
|
+
"rxjs-x/no-exposed-subjects": "error",
|
|
39
|
+
"rxjs-x/no-ignored-default-value": "error",
|
|
40
|
+
"rxjs-x/no-ignored-error": "error",
|
|
41
|
+
"rxjs-x/no-ignored-notifier": "error",
|
|
42
|
+
"rxjs-x/no-ignored-observable": "error",
|
|
43
|
+
"rxjs-x/no-ignored-replay-buffer": "error",
|
|
44
|
+
"rxjs-x/no-ignored-takewhile-value": "error",
|
|
45
|
+
"rxjs-x/no-implicit-any-catch": ["error", {
|
|
46
|
+
allowExplicitAny: false
|
|
47
|
+
}],
|
|
48
|
+
"rxjs-x/no-index": "error",
|
|
49
|
+
"rxjs-x/no-internal": "error",
|
|
50
|
+
"rxjs-x/no-nested-subscribe": "error",
|
|
51
|
+
"rxjs-x/no-redundant-notify": "error",
|
|
52
|
+
"rxjs-x/no-sharereplay": "error",
|
|
53
|
+
"rxjs-x/no-subclass": "error",
|
|
54
|
+
"rxjs-x/no-subject-unsubscribe": "error",
|
|
55
|
+
"rxjs-x/no-topromise": "error",
|
|
56
|
+
"rxjs-x/no-unbound-methods": "error",
|
|
57
|
+
"rxjs-x/no-unsafe-subject-next": "error",
|
|
58
|
+
"rxjs-x/no-unsafe-takeuntil": "error",
|
|
59
|
+
"rxjs-x/prefer-observer": "error",
|
|
60
|
+
"rxjs-x/prefer-root-operators": "error",
|
|
61
|
+
"rxjs-x/throw-error": ["error", {
|
|
62
|
+
allowThrowingAny: false,
|
|
63
|
+
allowThrowingUnknown: false
|
|
64
|
+
}]
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
29
68
|
// src/rules/ban-observables.ts
|
|
30
69
|
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
31
70
|
import { stripIndent } from "common-tags";
|
|
@@ -782,7 +821,7 @@ var noAsyncSubscribeRule = ruleCreator({
|
|
|
782
821
|
meta: {
|
|
783
822
|
docs: {
|
|
784
823
|
description: "Disallow passing `async` functions to `subscribe`.",
|
|
785
|
-
recommended:
|
|
824
|
+
recommended: "recommended",
|
|
786
825
|
requiresTypeChecking: true
|
|
787
826
|
},
|
|
788
827
|
messages: {
|
|
@@ -890,7 +929,7 @@ var noCreateRule = ruleCreator({
|
|
|
890
929
|
meta: {
|
|
891
930
|
docs: {
|
|
892
931
|
description: "Disallow the static `Observable.create` function.",
|
|
893
|
-
recommended:
|
|
932
|
+
recommended: "recommended",
|
|
894
933
|
requiresTypeChecking: true
|
|
895
934
|
},
|
|
896
935
|
messages: {
|
|
@@ -1032,7 +1071,8 @@ var noExplicitGenericsRule = ruleCreator({
|
|
|
1032
1071
|
defaultOptions: [],
|
|
1033
1072
|
meta: {
|
|
1034
1073
|
docs: {
|
|
1035
|
-
description: "Disallow unnecessary explicit generic type arguments."
|
|
1074
|
+
description: "Disallow unnecessary explicit generic type arguments.",
|
|
1075
|
+
recommended: "strict"
|
|
1036
1076
|
},
|
|
1037
1077
|
messages: {
|
|
1038
1078
|
forbidden: "Explicit generic type arguments are forbidden."
|
|
@@ -1085,6 +1125,7 @@ var noExposedSubjectsRule = ruleCreator({
|
|
|
1085
1125
|
meta: {
|
|
1086
1126
|
docs: {
|
|
1087
1127
|
description: "Disallow public and protected subjects.",
|
|
1128
|
+
recommended: "strict",
|
|
1088
1129
|
requiresTypeChecking: true
|
|
1089
1130
|
},
|
|
1090
1131
|
messages: {
|
|
@@ -1284,6 +1325,7 @@ var noIgnoredDefaultValueRule = ruleCreator({
|
|
|
1284
1325
|
meta: {
|
|
1285
1326
|
docs: {
|
|
1286
1327
|
description: "Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value.",
|
|
1328
|
+
recommended: "strict",
|
|
1287
1329
|
requiresTypeChecking: true
|
|
1288
1330
|
},
|
|
1289
1331
|
messages: {
|
|
@@ -1386,6 +1428,7 @@ var noIgnoredErrorRule = ruleCreator({
|
|
|
1386
1428
|
meta: {
|
|
1387
1429
|
docs: {
|
|
1388
1430
|
description: "Disallow calling `subscribe` without specifying an error handler.",
|
|
1431
|
+
recommended: "strict",
|
|
1389
1432
|
requiresTypeChecking: true
|
|
1390
1433
|
},
|
|
1391
1434
|
messages: {
|
|
@@ -1450,7 +1493,7 @@ var noIgnoredNotifierRule = ruleCreator({
|
|
|
1450
1493
|
meta: {
|
|
1451
1494
|
docs: {
|
|
1452
1495
|
description: "Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier.",
|
|
1453
|
-
recommended:
|
|
1496
|
+
recommended: "recommended",
|
|
1454
1497
|
requiresTypeChecking: true
|
|
1455
1498
|
},
|
|
1456
1499
|
messages: {
|
|
@@ -1522,6 +1565,7 @@ var noIgnoredObservableRule = ruleCreator({
|
|
|
1522
1565
|
meta: {
|
|
1523
1566
|
docs: {
|
|
1524
1567
|
description: "Disallow ignoring observables returned by functions.",
|
|
1568
|
+
recommended: "strict",
|
|
1525
1569
|
requiresTypeChecking: true
|
|
1526
1570
|
},
|
|
1527
1571
|
messages: {
|
|
@@ -1552,7 +1596,7 @@ var noIgnoredReplayBufferRule = ruleCreator({
|
|
|
1552
1596
|
meta: {
|
|
1553
1597
|
docs: {
|
|
1554
1598
|
description: "Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size.",
|
|
1555
|
-
recommended:
|
|
1599
|
+
recommended: "recommended"
|
|
1556
1600
|
},
|
|
1557
1601
|
messages: {
|
|
1558
1602
|
forbidden: "Ignoring the buffer size is forbidden."
|
|
@@ -1678,7 +1722,7 @@ var noIgnoredTakewhileValueRule = ruleCreator({
|
|
|
1678
1722
|
meta: {
|
|
1679
1723
|
docs: {
|
|
1680
1724
|
description: "Disallow ignoring the value within `takeWhile`.",
|
|
1681
|
-
recommended:
|
|
1725
|
+
recommended: "recommended"
|
|
1682
1726
|
},
|
|
1683
1727
|
messages: {
|
|
1684
1728
|
forbidden: "Ignoring the value within takeWhile is forbidden."
|
|
@@ -1742,7 +1786,12 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1742
1786
|
meta: {
|
|
1743
1787
|
docs: {
|
|
1744
1788
|
description: "Disallow implicit `any` error parameters in `catchError` operators.",
|
|
1745
|
-
recommended:
|
|
1789
|
+
recommended: {
|
|
1790
|
+
recommended: true,
|
|
1791
|
+
strict: [{
|
|
1792
|
+
allowExplicitAny: false
|
|
1793
|
+
}]
|
|
1794
|
+
},
|
|
1746
1795
|
requiresTypeChecking: true
|
|
1747
1796
|
},
|
|
1748
1797
|
fixable: "code",
|
|
@@ -1760,7 +1809,7 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1760
1809
|
allowExplicitAny: {
|
|
1761
1810
|
type: "boolean",
|
|
1762
1811
|
description: "Allow error variable to be explicitly typed as `any`.",
|
|
1763
|
-
default:
|
|
1812
|
+
default: true
|
|
1764
1813
|
}
|
|
1765
1814
|
},
|
|
1766
1815
|
type: "object"
|
|
@@ -1771,7 +1820,7 @@ var noImplicitAnyCatchRule = ruleCreator({
|
|
|
1771
1820
|
name: "no-implicit-any-catch",
|
|
1772
1821
|
create: (context) => {
|
|
1773
1822
|
const [config = {}] = context.options;
|
|
1774
|
-
const { allowExplicitAny =
|
|
1823
|
+
const { allowExplicitAny = true } = config;
|
|
1775
1824
|
const { couldBeObservable } = getTypeServices(context);
|
|
1776
1825
|
const sourceCode = context.sourceCode;
|
|
1777
1826
|
function checkCallback(callback) {
|
|
@@ -1880,7 +1929,7 @@ var noIndexRule = ruleCreator({
|
|
|
1880
1929
|
meta: {
|
|
1881
1930
|
docs: {
|
|
1882
1931
|
description: "Disallow importing index modules.",
|
|
1883
|
-
recommended:
|
|
1932
|
+
recommended: "recommended"
|
|
1884
1933
|
},
|
|
1885
1934
|
messages: {
|
|
1886
1935
|
forbidden: "RxJS imports from index modules are forbidden."
|
|
@@ -1907,7 +1956,7 @@ var noInternalRule = ruleCreator({
|
|
|
1907
1956
|
meta: {
|
|
1908
1957
|
docs: {
|
|
1909
1958
|
description: "Disallow importing internal modules.",
|
|
1910
|
-
recommended:
|
|
1959
|
+
recommended: "recommended"
|
|
1911
1960
|
},
|
|
1912
1961
|
fixable: "code",
|
|
1913
1962
|
hasSuggestions: true,
|
|
@@ -1983,7 +2032,7 @@ var noNestedSubscribeRule = ruleCreator({
|
|
|
1983
2032
|
meta: {
|
|
1984
2033
|
docs: {
|
|
1985
2034
|
description: "Disallow calling `subscribe` within a `subscribe` callback.",
|
|
1986
|
-
recommended:
|
|
2035
|
+
recommended: "recommended",
|
|
1987
2036
|
requiresTypeChecking: true
|
|
1988
2037
|
},
|
|
1989
2038
|
messages: {
|
|
@@ -2027,7 +2076,7 @@ var noRedundantNotifyRule = ruleCreator({
|
|
|
2027
2076
|
meta: {
|
|
2028
2077
|
docs: {
|
|
2029
2078
|
description: "Disallow sending redundant notifications from completed or errored observables.",
|
|
2030
|
-
recommended:
|
|
2079
|
+
recommended: "recommended",
|
|
2031
2080
|
requiresTypeChecking: true
|
|
2032
2081
|
},
|
|
2033
2082
|
messages: {
|
|
@@ -2106,7 +2155,7 @@ var noSharereplayRule = ruleCreator({
|
|
|
2106
2155
|
meta: {
|
|
2107
2156
|
docs: {
|
|
2108
2157
|
description: "Disallow unsafe `shareReplay` usage.",
|
|
2109
|
-
recommended:
|
|
2158
|
+
recommended: "recommended"
|
|
2110
2159
|
},
|
|
2111
2160
|
messages: {
|
|
2112
2161
|
forbidden: "shareReplay is forbidden.",
|
|
@@ -2149,6 +2198,7 @@ var noSubclassRule = ruleCreator({
|
|
|
2149
2198
|
meta: {
|
|
2150
2199
|
docs: {
|
|
2151
2200
|
description: "Disallow subclassing RxJS classes.",
|
|
2201
|
+
recommended: "strict",
|
|
2152
2202
|
requiresTypeChecking: true
|
|
2153
2203
|
},
|
|
2154
2204
|
messages: {
|
|
@@ -2192,7 +2242,7 @@ var noSubjectUnsubscribeRule = ruleCreator({
|
|
|
2192
2242
|
meta: {
|
|
2193
2243
|
docs: {
|
|
2194
2244
|
description: "Disallow calling the `unsubscribe` method of subjects.",
|
|
2195
|
-
recommended:
|
|
2245
|
+
recommended: "recommended",
|
|
2196
2246
|
requiresTypeChecking: true
|
|
2197
2247
|
},
|
|
2198
2248
|
messages: {
|
|
@@ -2335,6 +2385,7 @@ var noTopromiseRule = ruleCreator({
|
|
|
2335
2385
|
meta: {
|
|
2336
2386
|
docs: {
|
|
2337
2387
|
description: "Disallow use of the `toPromise` method.",
|
|
2388
|
+
recommended: "strict",
|
|
2338
2389
|
requiresTypeChecking: true
|
|
2339
2390
|
},
|
|
2340
2391
|
hasSuggestions: true,
|
|
@@ -2429,7 +2480,7 @@ var noUnboundMethodsRule = ruleCreator({
|
|
|
2429
2480
|
meta: {
|
|
2430
2481
|
docs: {
|
|
2431
2482
|
description: "Disallow passing unbound methods.",
|
|
2432
|
-
recommended:
|
|
2483
|
+
recommended: "recommended",
|
|
2433
2484
|
requiresTypeChecking: true
|
|
2434
2485
|
},
|
|
2435
2486
|
messages: {
|
|
@@ -2626,7 +2677,7 @@ var noUnsafeSubjectNext = ruleCreator({
|
|
|
2626
2677
|
meta: {
|
|
2627
2678
|
docs: {
|
|
2628
2679
|
description: "Disallow unsafe optional `next` calls.",
|
|
2629
|
-
recommended:
|
|
2680
|
+
recommended: "recommended",
|
|
2630
2681
|
requiresTypeChecking: true
|
|
2631
2682
|
},
|
|
2632
2683
|
messages: {
|
|
@@ -2827,7 +2878,7 @@ var noUnsafeTakeuntilRule = ruleCreator({
|
|
|
2827
2878
|
meta: {
|
|
2828
2879
|
docs: {
|
|
2829
2880
|
description: "Disallow applying operators after `takeUntil`.",
|
|
2830
|
-
recommended:
|
|
2881
|
+
recommended: "recommended",
|
|
2831
2882
|
requiresTypeChecking: true
|
|
2832
2883
|
},
|
|
2833
2884
|
messages: {
|
|
@@ -2908,6 +2959,7 @@ var preferObserverRule = ruleCreator({
|
|
|
2908
2959
|
meta: {
|
|
2909
2960
|
docs: {
|
|
2910
2961
|
description: "Disallow passing separate handlers to `subscribe` and `tap`.",
|
|
2962
|
+
recommended: "strict",
|
|
2911
2963
|
requiresTypeChecking: true
|
|
2912
2964
|
},
|
|
2913
2965
|
fixable: "code",
|
|
@@ -3016,7 +3068,8 @@ var preferRootOperatorsRule = ruleCreator({
|
|
|
3016
3068
|
defaultOptions: [],
|
|
3017
3069
|
meta: {
|
|
3018
3070
|
docs: {
|
|
3019
|
-
description: "Disallow importing operators from `rxjs/operators`."
|
|
3071
|
+
description: "Disallow importing operators from `rxjs/operators`.",
|
|
3072
|
+
recommended: "strict"
|
|
3020
3073
|
},
|
|
3021
3074
|
fixable: "code",
|
|
3022
3075
|
hasSuggestions: true,
|
|
@@ -3343,6 +3396,9 @@ var throwErrorRule = ruleCreator({
|
|
|
3343
3396
|
meta: {
|
|
3344
3397
|
docs: {
|
|
3345
3398
|
description: "Enforce passing only `Error` values to `throwError`.",
|
|
3399
|
+
recommended: {
|
|
3400
|
+
strict: [{ allowThrowingAny: false, allowThrowingUnknown: false }]
|
|
3401
|
+
},
|
|
3346
3402
|
requiresTypeChecking: true
|
|
3347
3403
|
},
|
|
3348
3404
|
messages: {
|
|
@@ -3461,7 +3517,8 @@ var plugin = {
|
|
|
3461
3517
|
var rxjsX = {
|
|
3462
3518
|
...plugin,
|
|
3463
3519
|
configs: {
|
|
3464
|
-
recommended: createRecommendedConfig(plugin)
|
|
3520
|
+
recommended: createRecommendedConfig(plugin),
|
|
3521
|
+
strict: createStrictConfig(plugin)
|
|
3465
3522
|
}
|
|
3466
3523
|
};
|
|
3467
3524
|
var src_default = rxjsX;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow passing `async` functions to `subscribe` (`rxjs-x/no-async-subscribe`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
package/docs/rules/no-create.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow the static `Observable.create` function (`rxjs-x/no-create`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow unnecessary explicit generic type arguments (`rxjs-x/no-explicit-generics`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
<!-- end auto-generated rule header -->
|
|
4
6
|
|
|
5
7
|
This rule prevents the use of explicit type arguments when the type arguments can be inferred.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow public and protected subjects (`rxjs-x/no-exposed-subjects`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value (`rxjs-x/no-ignored-default-value`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow calling `subscribe` without specifying an error handler (`rxjs-x/no-ignored-error`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier (`rxjs-x/no-ignored-notifier`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow ignoring observables returned by functions (`rxjs-x/no-ignored-observable`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size (`rxjs-x/no-ignored-replay-buffer`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
<!-- end auto-generated rule header -->
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow ignoring the value within `takeWhile` (`rxjs-x/no-ignored-takewhile-value`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
<!-- end auto-generated rule header -->
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow implicit `any` error parameters in `catchError` operators (`rxjs-x/no-implicit-any-catch`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π§π‘ 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).
|
|
6
6
|
|
|
@@ -74,11 +74,11 @@ throwError(() => new Error("Kaboom!")).pipe(
|
|
|
74
74
|
|
|
75
75
|
| Name | Description | Type | Default |
|
|
76
76
|
| :----------------- | :---------------------------------------------------- | :------ | :------ |
|
|
77
|
-
| `allowExplicitAny` | Allow error variable to be explicitly typed as `any`. | Boolean | `
|
|
77
|
+
| `allowExplicitAny` | Allow error variable to be explicitly typed as `any`. | Boolean | `true` |
|
|
78
78
|
|
|
79
79
|
<!-- end auto-generated rule options list -->
|
|
80
80
|
|
|
81
|
-
This rule accepts a single option which is an object with an `allowExplicitAny` property that determines whether or not the error variable can be explicitly typed as `any`. By default, the use of explicit `any` is
|
|
81
|
+
This rule accepts a single option which is an object with an `allowExplicitAny` property that determines whether or not the error variable can be explicitly typed as `any`. By default, the use of explicit `any` is allowed.
|
|
82
82
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
package/docs/rules/no-index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow importing internal modules (`rxjs-x/no-internal`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π§π‘ 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).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow calling `subscribe` within a `subscribe` callback (`rxjs-x/no-nested-subscribe`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow sending redundant notifications from completed or errored observables (`rxjs-x/no-redundant-notify`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow calling the `unsubscribe` method of subjects (`rxjs-x/no-subject-unsubscribe`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow use of the `toPromise` method (`rxjs-x/no-topromise`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π‘ This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
|
|
4
6
|
|
|
5
7
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow passing unbound methods (`rxjs-x/no-unbound-methods`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow unsafe optional `next` calls (`rxjs-x/no-unsafe-subject-next`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Disallow applying operators after `takeUntil` (`rxjs-x/no-unsafe-takeuntil`)
|
|
2
2
|
|
|
3
|
-
πΌ This rule is enabled in the β
`recommended`
|
|
3
|
+
πΌ This rule is enabled in the following configs: β
`recommended`, π `strict`.
|
|
4
4
|
|
|
5
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
6
6
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow passing separate handlers to `subscribe` and `tap` (`rxjs-x/prefer-observer`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π§π‘ 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).
|
|
4
6
|
|
|
5
7
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
@@ -46,3 +48,7 @@ This rule accepts a single option which is an object with an `allowNext` propert
|
|
|
46
48
|
]
|
|
47
49
|
}
|
|
48
50
|
```
|
|
51
|
+
|
|
52
|
+
## Further reading
|
|
53
|
+
|
|
54
|
+
- [Subscribe Arguments](https://rxjs.dev/deprecations/subscribe-arguments)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Disallow importing operators from `rxjs/operators` (`rxjs-x/prefer-root-operators`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π§π‘ 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).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Enforce passing only `Error` values to `throwError` (`rxjs-x/throw-error`)
|
|
2
2
|
|
|
3
|
+
πΌ This rule is enabled in the π `strict` config.
|
|
4
|
+
|
|
3
5
|
π This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
|
|
4
6
|
|
|
5
7
|
<!-- end auto-generated rule header -->
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-rxjs-x",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "yarn@4.5.
|
|
4
|
+
"version": "0.4.1",
|
|
5
|
+
"packageManager": "yarn@4.5.3+sha512.3003a14012e2987072d244c720506549c1aab73ee728208f1b2580a9fd67b92d61ba6b08fe93f6dce68fd771e3af1e59a0afa28dd242dd0940d73b95fedd4e90",
|
|
6
6
|
"description": "ESLint v9+ plugin for RxJS",
|
|
7
7
|
"author": "Jason Weinzierl <weinzierljason@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"lint-docs": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"",
|
|
48
48
|
"lint-eslint-docs": "yarn build && eslint-doc-generator --check",
|
|
49
49
|
"docs": "eslint-doc-generator",
|
|
50
|
-
"release": "bumpp &&
|
|
50
|
+
"release": "bumpp && echo \"Create a new release in GitHub to trigger the publish workflow.\"",
|
|
51
51
|
"test": "vitest",
|
|
52
52
|
"coverage": "vitest run --coverage",
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/js": "^9.14.0",
|
|
75
|
-
"@stylistic/eslint-plugin": "^2.
|
|
75
|
+
"@stylistic/eslint-plugin": "^2.11.0",
|
|
76
76
|
"@types/common-tags": "^1.8.4",
|
|
77
77
|
"@types/node": "~18.18.0",
|
|
78
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
78
|
+
"@typescript-eslint/rule-tester": "^8.15.0",
|
|
79
79
|
"@typescript/vfs": "^1.6.0",
|
|
80
80
|
"@vitest/coverage-v8": "^2.1.5",
|
|
81
81
|
"@vitest/eslint-plugin": "^1.1.10",
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
87
87
|
"eslint-plugin-eslint-plugin": "^6.3.2",
|
|
88
88
|
"eslint-plugin-import-x": "^4.4.2",
|
|
89
|
-
"eslint-plugin-n": "^17.
|
|
89
|
+
"eslint-plugin-n": "^17.14.0",
|
|
90
90
|
"markdownlint-cli2": "^0.15.0",
|
|
91
91
|
"rxjs": "^7.8.1",
|
|
92
92
|
"tsup": "^8.3.5",
|
|
93
|
-
"typescript": "~5.
|
|
94
|
-
"typescript-eslint": "^8.
|
|
93
|
+
"typescript": "~5.7.2",
|
|
94
|
+
"typescript-eslint": "^8.15.0",
|
|
95
95
|
"vitest": "^2.1.5"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|