eslint-plugin-rxjs-x 0.3.1 β 0.4.0
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 -50
- package/dist/index.d.mts +40 -4
- package/dist/index.d.ts +40 -4
- package/dist/index.js +295 -28
- package/dist/index.mjs +295 -28
- package/docs/rules/no-async-subscribe.md +1 -1
- package/docs/rules/no-compat.md +4 -0
- 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 +8 -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 +34 -0
- package/docs/rules/throw-error.md +2 -0
- package/package.json +3 -3
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,54 +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
|
-
| [
|
|
110
|
-
| [
|
|
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`. | π | | | π | |
|
|
111
121
|
|
|
112
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
|
};
|
|
@@ -87,7 +122,7 @@ declare const rxjsX: {
|
|
|
87
122
|
'no-subject-value': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
88
123
|
'no-subscribe-handlers': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
89
124
|
'no-tap': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
90
|
-
'no-topromise': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
125
|
+
'no-topromise': TSESLint.RuleModule<"forbidden" | "suggestLastValueFrom" | "suggestFirstValueFrom", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
91
126
|
'no-unbound-methods': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
92
127
|
'no-unsafe-catch': TSESLint.RuleModule<"forbidden", readonly {
|
|
93
128
|
observable?: string;
|
|
@@ -108,6 +143,7 @@ declare const rxjsX: {
|
|
|
108
143
|
'prefer-observer': TSESLint.RuleModule<"forbidden", readonly {
|
|
109
144
|
allowNext?: boolean;
|
|
110
145
|
}[], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
146
|
+
'prefer-root-operators': TSESLint.RuleModule<"forbidden" | "suggest" | "forbiddenWithoutFix", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
111
147
|
'suffix-subjects': TSESLint.RuleModule<"forbidden", readonly {
|
|
112
148
|
parameters?: boolean;
|
|
113
149
|
properties?: boolean;
|
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
|
};
|
|
@@ -87,7 +122,7 @@ declare const rxjsX: {
|
|
|
87
122
|
'no-subject-value': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
88
123
|
'no-subscribe-handlers': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
89
124
|
'no-tap': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
90
|
-
'no-topromise': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
125
|
+
'no-topromise': TSESLint.RuleModule<"forbidden" | "suggestLastValueFrom" | "suggestFirstValueFrom", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
91
126
|
'no-unbound-methods': TSESLint.RuleModule<"forbidden", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
92
127
|
'no-unsafe-catch': TSESLint.RuleModule<"forbidden", readonly {
|
|
93
128
|
observable?: string;
|
|
@@ -108,6 +143,7 @@ declare const rxjsX: {
|
|
|
108
143
|
'prefer-observer': TSESLint.RuleModule<"forbidden", readonly {
|
|
109
144
|
allowNext?: boolean;
|
|
110
145
|
}[], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
146
|
+
'prefer-root-operators': TSESLint.RuleModule<"forbidden" | "suggest" | "forbiddenWithoutFix", [], RxjsXRuleDocs, TSESLint.RuleListener>;
|
|
111
147
|
'suffix-subjects': TSESLint.RuleModule<"forbidden", readonly {
|
|
112
148
|
parameters?: boolean;
|
|
113
149
|
properties?: boolean;
|