eslint-plugin-rxjs-x 0.9.4 → 1.0.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/dist/index.d.ts CHANGED
@@ -1,393 +1,354 @@
1
- import { TSESLint } from '@typescript-eslint/utils';
2
- import { ESLint, Rule } from 'eslint';
1
+ import { TSESLint } from "@typescript-eslint/utils";
2
+ import { ESLint, Rule } from "eslint";
3
3
 
4
- interface ChecksVoidReturnOptions {
5
- arguments?: boolean;
6
- attributes?: boolean;
7
- inheritedMethods?: boolean;
4
+ //#region src/index.d.ts
5
+ declare const allRules: {
6
+ 'ban-observables': TSESLint.RuleModule<"forbidden", readonly [Record<string, string | boolean>], {
7
+ description: "Disallow banned observable creators.";
8
+ }, TSESLint.RuleListener>;
9
+ 'ban-operators': TSESLint.RuleModule<"forbidden", readonly [Record<string, string | boolean>], {
10
+ description: "Disallow banned operators.";
11
+ requiresTypeChecking: true;
12
+ }, TSESLint.RuleListener>;
13
+ finnish: TSESLint.RuleModule<"shouldBeFinnish" | "shouldBeFinnishProperty" | "shouldNotBeFinnish", readonly [{
14
+ functions?: boolean;
15
+ methods?: boolean;
16
+ names?: Record<string, boolean>;
17
+ parameters?: boolean;
8
18
  properties?: boolean;
9
- returns?: boolean;
19
+ objects?: boolean;
20
+ strict?: boolean;
21
+ types?: Record<string, boolean>;
10
22
  variables?: boolean;
11
- }
12
-
13
- declare const allRules: {
14
- 'ban-observables': TSESLint.RuleModule<"forbidden", readonly Record<string, string | boolean>[], {
15
- description: "Disallow banned observable creators.";
16
- }, TSESLint.RuleListener>;
17
- 'ban-operators': TSESLint.RuleModule<"forbidden", readonly Record<string, string | boolean>[], {
18
- description: "Disallow banned operators.";
19
- requiresTypeChecking: true;
20
- }, TSESLint.RuleListener>;
21
- finnish: TSESLint.RuleModule<"shouldBeFinnish" | "shouldBeFinnishProperty" | "shouldNotBeFinnish", readonly {
22
- functions?: boolean;
23
- methods?: boolean;
24
- names?: Record<string, boolean>;
25
- parameters?: boolean;
26
- properties?: boolean;
27
- objects?: boolean;
28
- strict?: boolean;
29
- types?: Record<string, boolean>;
30
- variables?: boolean;
31
- }[], {
32
- description: "Enforce Finnish notation.";
33
- requiresTypeChecking: true;
34
- }, TSESLint.RuleListener>;
35
- just: TSESLint.RuleModule<"forbidden", [], {
36
- description: "Require the use of `just` instead of `of`.";
37
- }, TSESLint.RuleListener>;
38
- macro: TSESLint.RuleModule<"macro", [], {
39
- description: "Require the use of the RxJS Tools Babel macro.";
40
- }, TSESLint.RuleListener>;
41
- 'no-async-subscribe': TSESLint.RuleModule<"forbidden", [], {
42
- description: "Disallow passing `async` functions to `subscribe`.";
43
- recommended: "recommended";
44
- requiresTypeChecking: true;
45
- }, TSESLint.RuleListener>;
46
- 'no-compat': TSESLint.RuleModule<"forbidden", [], {
47
- description: "Disallow the `rxjs-compat` package.";
48
- }, TSESLint.RuleListener>;
49
- 'no-connectable': TSESLint.RuleModule<"forbidden", [], {
50
- description: "Disallow operators that return connectable observables.";
51
- requiresTypeChecking: true;
52
- }, TSESLint.RuleListener>;
53
- 'no-create': TSESLint.RuleModule<"forbidden" | "forbiddenSubject", [], {
54
- description: "Disallow the static `Observable.create` and `Subject.create` functions.";
55
- recommended: "recommended";
56
- requiresTypeChecking: true;
57
- }, TSESLint.RuleListener>;
58
- 'no-cyclic-action': TSESLint.RuleModule<"forbidden", readonly {
59
- observable?: string;
60
- }[], {
61
- description: "Disallow cyclic actions in effects and epics.";
62
- requiresTypeChecking: true;
63
- }, TSESLint.RuleListener>;
64
- 'no-explicit-generics': TSESLint.RuleModule<"forbidden", [], {
65
- description: "Disallow unnecessary explicit generic type arguments.";
66
- requiresTypeChecking: true;
67
- }, TSESLint.RuleListener>;
68
- 'no-exposed-subjects': TSESLint.RuleModule<"forbidden" | "forbiddenAllowProtected", readonly {
69
- allowProtected?: boolean;
70
- }[], {
71
- description: "Disallow public and protected subjects.";
72
- recommended: "strict";
73
- requiresTypeChecking: true;
74
- }, TSESLint.RuleListener>;
75
- 'no-finnish': TSESLint.RuleModule<"forbidden", [], {
76
- description: "Disallow Finnish notation.";
77
- requiresTypeChecking: true;
78
- }, TSESLint.RuleListener>;
79
- 'no-floating-observables': TSESLint.RuleModule<"forbidden" | "forbiddenNoVoid", readonly {
80
- ignoreVoid?: boolean;
81
- }[], {
82
- description: "Require Observables to be handled appropriately.";
83
- recommended: "strict";
84
- requiresTypeChecking: true;
85
- }, TSESLint.RuleListener>;
86
- 'no-ignored-default-value': TSESLint.RuleModule<"forbidden", [], {
87
- description: "Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value.";
88
- recommended: "strict";
89
- requiresTypeChecking: true;
90
- }, TSESLint.RuleListener>;
91
- 'no-ignored-error': TSESLint.RuleModule<"forbidden", [], {
92
- description: "Disallow calling `subscribe` without specifying an error handler.";
93
- recommended: "strict";
94
- requiresTypeChecking: true;
95
- }, TSESLint.RuleListener>;
96
- 'no-ignored-notifier': TSESLint.RuleModule<"forbidden", [], {
97
- description: "Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier.";
98
- recommended: "recommended";
99
- requiresTypeChecking: true;
100
- }, TSESLint.RuleListener>;
101
- 'no-ignored-observable': TSESLint.RuleModule<"forbidden", [], {
102
- description: "Disallow ignoring of observables returned by functions.";
103
- }, TSESLint.RuleListener>;
104
- 'no-ignored-replay-buffer': TSESLint.RuleModule<"forbidden", [], {
105
- description: "Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size.";
106
- recommended: "recommended";
107
- }, TSESLint.RuleListener>;
108
- 'no-ignored-subscribe': TSESLint.RuleModule<"forbidden", [], {
109
- description: "Disallow calling `subscribe` without specifying arguments.";
110
- requiresTypeChecking: true;
111
- }, TSESLint.RuleListener>;
112
- 'no-ignored-subscription': TSESLint.RuleModule<"forbidden", readonly {
113
- completers?: string[];
114
- postCompleters?: string[];
115
- }[], {
116
- description: "Disallow ignoring the subscription returned by `subscribe`.";
117
- requiresTypeChecking: true;
118
- }, TSESLint.RuleListener>;
119
- 'no-ignored-takewhile-value': TSESLint.RuleModule<"forbidden", [], {
120
- description: "Disallow ignoring the value within `takeWhile`.";
121
- recommended: "recommended";
122
- }, TSESLint.RuleListener>;
123
- 'no-implicit-any-catch': TSESLint.RuleModule<"explicitAny" | "implicitAny" | "narrowed" | "narrowedAllowError" | "suggestExplicitUnknown" | "suggestExplicitAny" | "suggestExplicitError", readonly {
124
- allowExplicitAny?: boolean;
125
- allowExplicitError?: boolean;
126
- }[], {
127
- description: "Disallow implicit `any` error parameters in `catchError`, `subscribe`, and `tap`.";
128
- recommended: {
129
- recommended: true;
130
- strict: [{
131
- allowExplicitAny: boolean;
132
- }];
133
- };
134
- requiresTypeChecking: true;
135
- }, TSESLint.RuleListener>;
136
- 'no-index': TSESLint.RuleModule<"forbidden", [], {
137
- description: "Disallow importing index modules.";
138
- recommended: "recommended";
139
- }, TSESLint.RuleListener>;
140
- 'no-internal': TSESLint.RuleModule<"forbidden" | "suggest", [], {
141
- description: "Disallow importing internal modules.";
142
- recommended: "recommended";
143
- }, TSESLint.RuleListener>;
144
- 'no-misused-observables': TSESLint.RuleModule<"forbiddenVoidReturnArgument" | "forbiddenVoidReturnAttribute" | "forbiddenVoidReturnInheritedMethod" | "forbiddenVoidReturnProperty" | "forbiddenVoidReturnReturnValue" | "forbiddenVoidReturnVariable" | "forbiddenSpread", readonly {
145
- checksVoidReturn?: boolean | ChecksVoidReturnOptions;
146
- checksSpreads?: boolean;
147
- }[], {
148
- description: "Disallow Observables in places not designed to handle them.";
149
- recommended: "strict";
150
- requiresTypeChecking: true;
151
- }, TSESLint.RuleListener>;
152
- 'no-nested-subscribe': TSESLint.RuleModule<"forbidden", [], {
153
- description: "Disallow calling `subscribe` within a `subscribe` callback.";
154
- recommended: "recommended";
155
- requiresTypeChecking: true;
156
- }, TSESLint.RuleListener>;
157
- 'no-redundant-notify': TSESLint.RuleModule<"forbidden", [], {
158
- description: "Disallow sending redundant notifications from completed or errored observables.";
159
- recommended: "recommended";
160
- requiresTypeChecking: true;
161
- }, TSESLint.RuleListener>;
162
- 'no-sharereplay': TSESLint.RuleModule<"forbidden" | "forbiddenWithoutConfig", readonly {
163
- allowConfig?: boolean;
164
- }[], {
165
- description: "Disallow unsafe `shareReplay` usage.";
166
- recommended: "recommended";
167
- }, TSESLint.RuleListener>;
168
- 'no-sharereplay-before-takeuntil': TSESLint.RuleModule<"forbidden", readonly {
169
- takeUntilAlias?: string[];
170
- }[], {
171
- description: "Disallow using `shareReplay({ refCount: false })` before `takeUntil`.";
172
- recommended: "strict";
173
- }, TSESLint.RuleListener>;
174
- 'no-subclass': TSESLint.RuleModule<"forbidden", [], {
175
- description: "Disallow subclassing RxJS classes.";
176
- recommended: "strict";
177
- requiresTypeChecking: true;
178
- }, TSESLint.RuleListener>;
179
- 'no-subject-unsubscribe': TSESLint.RuleModule<"forbidden", [], {
180
- description: "Disallow calling the `unsubscribe` method of subjects.";
181
- recommended: "recommended";
182
- requiresTypeChecking: true;
183
- }, TSESLint.RuleListener>;
184
- 'no-subject-value': TSESLint.RuleModule<"forbidden", [], {
185
- description: "Disallow accessing the `value` property of a `BehaviorSubject` instance.";
186
- requiresTypeChecking: true;
187
- }, TSESLint.RuleListener>;
188
- 'no-subscribe-handlers': TSESLint.RuleModule<"forbidden", [], {
189
- description: "Disallow passing handlers to `subscribe`.";
190
- requiresTypeChecking: true;
191
- }, TSESLint.RuleListener>;
192
- 'no-subscribe-in-pipe': TSESLint.RuleModule<"forbidden", [], {
193
- description: "Disallow calling of `subscribe` within any RxJS operator inside a `pipe`.";
194
- recommended: "recommended";
195
- requiresTypeChecking: true;
196
- }, TSESLint.RuleListener>;
197
- 'no-tap': TSESLint.RuleModule<"forbidden", [], {
198
- description: "Disallow the `tap` operator.";
199
- }, TSESLint.RuleListener>;
200
- 'no-topromise': TSESLint.RuleModule<"forbidden" | "suggestLastValueFromWithDefault" | "suggestLastValueFrom" | "suggestFirstValueFrom", [], {
201
- description: "Disallow use of the `toPromise` method.";
202
- recommended: "recommended";
203
- requiresTypeChecking: true;
204
- }, TSESLint.RuleListener>;
205
- 'no-unbound-methods': TSESLint.RuleModule<"forbidden", readonly {
206
- allowTypes?: string[];
207
- }[], {
208
- description: "Disallow passing unbound methods.";
209
- recommended: "recommended";
210
- requiresTypeChecking: true;
211
- }, TSESLint.RuleListener>;
212
- 'no-unnecessary-collection': TSESLint.RuleModule<"forbidden", [], {
213
- description: "Disallow unnecessary usage of collection arguments with single values.";
214
- recommended: "strict";
215
- requiresTypeChecking: false;
216
- }, TSESLint.RuleListener>;
217
- 'no-unsafe-catch': TSESLint.RuleModule<"forbidden", readonly {
218
- observable?: string;
219
- }[], {
220
- description: "Disallow unsafe `catchError` usage in effects and epics.";
221
- requiresTypeChecking: true;
222
- }, TSESLint.RuleListener>;
223
- 'no-unsafe-first': TSESLint.RuleModule<"forbidden", readonly {
224
- observable?: string;
225
- }[], {
226
- description: "Disallow unsafe `first`/`take` usage in effects and epics.";
227
- requiresTypeChecking: true;
228
- }, TSESLint.RuleListener>;
229
- 'no-unsafe-subject-next': TSESLint.RuleModule<"forbidden", [], {
230
- description: "Disallow unsafe optional `next` calls.";
231
- recommended: "recommended";
232
- requiresTypeChecking: true;
233
- }, TSESLint.RuleListener>;
234
- 'no-unsafe-switchmap': TSESLint.RuleModule<"forbidden", readonly {
235
- allow?: string | string[];
236
- disallow?: string | string[];
237
- observable?: string;
238
- }[], {
239
- description: "Disallow unsafe `switchMap` usage in effects and epics.";
240
- requiresTypeChecking: true;
241
- }, TSESLint.RuleListener>;
242
- 'no-unsafe-takeuntil': TSESLint.RuleModule<"forbidden", readonly {
243
- alias?: string[];
244
- allow?: string[];
245
- }[], {
246
- description: "Disallow applying operators after `takeUntil`.";
247
- recommended: "recommended";
248
- requiresTypeChecking: true;
249
- }, TSESLint.RuleListener>;
250
- 'prefer-observer': TSESLint.RuleModule<"forbidden" | "suggest", readonly {
251
- allowNext?: boolean;
252
- }[], {
253
- description: "Disallow passing separate handlers to `subscribe` and `tap`.";
254
- recommended: "recommended";
255
- requiresTypeChecking: true;
256
- }, TSESLint.RuleListener>;
257
- 'prefer-root-operators': TSESLint.RuleModule<"forbidden" | "suggest" | "forbiddenWithoutFix", [], {
258
- description: "Disallow importing operators from `rxjs/operators`.";
259
- recommended: "recommended";
260
- }, TSESLint.RuleListener>;
261
- 'suffix-subjects': TSESLint.RuleModule<"forbidden" | "forbiddenProperty", readonly {
262
- parameters?: boolean;
263
- properties?: boolean;
264
- objects?: boolean;
265
- suffix?: string;
266
- types?: Record<string, boolean>;
267
- variables?: boolean;
268
- }[], {
269
- description: "Enforce the use of a suffix in subject identifiers.";
270
- requiresTypeChecking: true;
271
- }, TSESLint.RuleListener>;
272
- 'throw-error': TSESLint.RuleModule<"forbidden" | "suggestErrorConstructor", readonly {
273
- allowThrowingAny?: boolean;
274
- allowThrowingUnknown?: boolean;
275
- }[], {
276
- description: "Enforce passing only `Error` values to `throwError` or `Subject.error`.";
277
- recommended: {
278
- recommended: true;
279
- strict: [{
280
- allowThrowingAny: boolean;
281
- allowThrowingUnknown: boolean;
282
- }];
283
- };
284
- requiresTypeChecking: true;
285
- }, TSESLint.RuleListener>;
23
+ }], {
24
+ description: "Enforce Finnish notation.";
25
+ requiresTypeChecking: true;
26
+ }, TSESLint.RuleListener>;
27
+ just: TSESLint.RuleModule<"forbidden", readonly [], {
28
+ description: "Require the use of `just` instead of `of`.";
29
+ }, TSESLint.RuleListener>;
30
+ 'no-async-subscribe': TSESLint.RuleModule<"forbidden", readonly [], {
31
+ description: "Disallow passing `async` functions to `subscribe`.";
32
+ recommended: "recommended";
33
+ requiresTypeChecking: true;
34
+ }, TSESLint.RuleListener>;
35
+ 'no-connectable': TSESLint.RuleModule<"forbidden", readonly [], {
36
+ description: "Disallow operators that return connectable observables.";
37
+ requiresTypeChecking: true;
38
+ }, TSESLint.RuleListener>;
39
+ 'no-create': TSESLint.RuleModule<"forbidden" | "forbiddenSubject", readonly [], {
40
+ description: "Disallow the static `Observable.create` and `Subject.create` functions.";
41
+ recommended: "recommended";
42
+ requiresTypeChecking: true;
43
+ }, TSESLint.RuleListener>;
44
+ 'no-cyclic-action': TSESLint.RuleModule<"forbidden", readonly [{
45
+ observable?: string;
46
+ }], {
47
+ description: "Disallow cyclic actions in effects and epics.";
48
+ requiresTypeChecking: true;
49
+ }, TSESLint.RuleListener>;
50
+ 'no-explicit-generics': TSESLint.RuleModule<"forbidden", readonly [], {
51
+ description: "Disallow unnecessary explicit generic type arguments.";
52
+ requiresTypeChecking: true;
53
+ }, TSESLint.RuleListener>;
54
+ 'no-exposed-subjects': TSESLint.RuleModule<"forbidden" | "forbiddenAllowProtected", readonly [{
55
+ allowProtected?: boolean;
56
+ }], {
57
+ description: "Disallow public and protected subjects.";
58
+ recommended: "strict";
59
+ requiresTypeChecking: true;
60
+ }, TSESLint.RuleListener>;
61
+ 'no-finnish': TSESLint.RuleModule<"forbidden", readonly [], {
62
+ description: "Disallow Finnish notation.";
63
+ requiresTypeChecking: true;
64
+ }, TSESLint.RuleListener>;
65
+ 'no-floating-observables': TSESLint.RuleModule<"forbidden" | "forbiddenNoVoid", readonly [{
66
+ ignoreVoid?: boolean;
67
+ }], {
68
+ description: "Require Observables to be handled appropriately.";
69
+ recommended: "strict";
70
+ requiresTypeChecking: true;
71
+ }, TSESLint.RuleListener>;
72
+ 'no-ignored-default-value': TSESLint.RuleModule<"forbidden", readonly [], {
73
+ description: "Disallow using `firstValueFrom`, `lastValueFrom`, `first`, and `last` without specifying a default value.";
74
+ recommended: "strict";
75
+ requiresTypeChecking: true;
76
+ }, TSESLint.RuleListener>;
77
+ 'no-ignored-error': TSESLint.RuleModule<"forbidden", readonly [], {
78
+ description: "Disallow calling `subscribe` without specifying an error handler.";
79
+ recommended: "strict";
80
+ requiresTypeChecking: true;
81
+ }, TSESLint.RuleListener>;
82
+ 'no-ignored-notifier': TSESLint.RuleModule<"forbidden", readonly [], {
83
+ description: "Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier.";
84
+ recommended: "recommended";
85
+ requiresTypeChecking: true;
86
+ }, TSESLint.RuleListener>;
87
+ 'no-ignored-replay-buffer': TSESLint.RuleModule<"forbidden", readonly [], {
88
+ description: "Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size.";
89
+ recommended: "recommended";
90
+ }, TSESLint.RuleListener>;
91
+ 'no-ignored-subscribe': TSESLint.RuleModule<"forbidden", readonly [], {
92
+ description: "Disallow calling `subscribe` without specifying arguments.";
93
+ requiresTypeChecking: true;
94
+ }, TSESLint.RuleListener>;
95
+ 'no-ignored-subscription': TSESLint.RuleModule<"forbidden", readonly [{
96
+ completers?: string[];
97
+ postCompleters?: string[];
98
+ }], {
99
+ description: "Disallow ignoring the subscription returned by `subscribe`.";
100
+ requiresTypeChecking: true;
101
+ }, TSESLint.RuleListener>;
102
+ 'no-ignored-takewhile-value': TSESLint.RuleModule<"forbidden", readonly [], {
103
+ description: "Disallow ignoring the value within `takeWhile`.";
104
+ recommended: "recommended";
105
+ }, TSESLint.RuleListener>;
106
+ 'no-implicit-any-catch': TSESLint.RuleModule<"explicitAny" | "implicitAny" | "narrowed" | "narrowedAllowError" | "suggestExplicitUnknown" | "suggestExplicitAny" | "suggestExplicitError", readonly [{
107
+ allowExplicitAny?: boolean;
108
+ allowExplicitError?: boolean;
109
+ }], {
110
+ description: "Disallow implicit `any` error parameters in `catchError`, `subscribe`, and `tap`.";
111
+ recommended: {
112
+ recommended: true;
113
+ strict: [{
114
+ allowExplicitAny: boolean;
115
+ }];
116
+ };
117
+ requiresTypeChecking: true;
118
+ }, TSESLint.RuleListener>;
119
+ 'no-index': TSESLint.RuleModule<"forbidden", readonly [], {
120
+ description: "Disallow importing index modules.";
121
+ recommended: "recommended";
122
+ }, TSESLint.RuleListener>;
123
+ 'no-internal': TSESLint.RuleModule<"forbidden" | "suggest", readonly [], {
124
+ description: "Disallow importing internal modules.";
125
+ recommended: "recommended";
126
+ }, TSESLint.RuleListener>;
127
+ 'no-misused-observables': TSESLint.RuleModule<"forbiddenVoidReturnArgument" | "forbiddenVoidReturnAttribute" | "forbiddenVoidReturnInheritedMethod" | "forbiddenVoidReturnProperty" | "forbiddenVoidReturnReturnValue" | "forbiddenVoidReturnVariable" | "forbiddenSpread", readonly [{
128
+ checksVoidReturn?: boolean | {
129
+ arguments?: boolean;
130
+ attributes?: boolean;
131
+ inheritedMethods?: boolean;
132
+ properties?: boolean;
133
+ returns?: boolean;
134
+ variables?: boolean;
135
+ };
136
+ checksSpreads?: boolean;
137
+ }], {
138
+ description: "Disallow Observables in places not designed to handle them.";
139
+ recommended: "strict";
140
+ requiresTypeChecking: true;
141
+ }, TSESLint.RuleListener>;
142
+ 'no-nested-subscribe': TSESLint.RuleModule<"forbidden", readonly [], {
143
+ description: "Disallow calling `subscribe` within a `subscribe` callback.";
144
+ recommended: "recommended";
145
+ requiresTypeChecking: true;
146
+ }, TSESLint.RuleListener>;
147
+ 'no-redundant-notify': TSESLint.RuleModule<"forbidden", readonly [], {
148
+ description: "Disallow sending redundant notifications from completed or errored observables.";
149
+ recommended: "recommended";
150
+ requiresTypeChecking: true;
151
+ }, TSESLint.RuleListener>;
152
+ 'no-sharereplay': TSESLint.RuleModule<"forbidden" | "forbiddenWithoutConfig", readonly [{
153
+ allowConfig?: boolean;
154
+ }], {
155
+ description: "Disallow unsafe `shareReplay` usage.";
156
+ recommended: "recommended";
157
+ }, TSESLint.RuleListener>;
158
+ 'no-sharereplay-before-takeuntil': TSESLint.RuleModule<"forbidden", readonly [{
159
+ takeUntilAlias?: string[];
160
+ }], {
161
+ description: "Disallow using `shareReplay({ refCount: false })` before `takeUntil`.";
162
+ recommended: "strict";
163
+ }, TSESLint.RuleListener>;
164
+ 'no-subclass': TSESLint.RuleModule<"forbidden", readonly [], {
165
+ description: "Disallow subclassing RxJS classes.";
166
+ recommended: "strict";
167
+ requiresTypeChecking: true;
168
+ }, TSESLint.RuleListener>;
169
+ 'no-subject-unsubscribe': TSESLint.RuleModule<"forbidden", readonly [], {
170
+ description: "Disallow calling the `unsubscribe` method of subjects.";
171
+ recommended: "recommended";
172
+ requiresTypeChecking: true;
173
+ }, TSESLint.RuleListener>;
174
+ 'no-subject-value': TSESLint.RuleModule<"forbidden", readonly [], {
175
+ description: "Disallow accessing the `value` property of a `BehaviorSubject` instance.";
176
+ requiresTypeChecking: true;
177
+ }, TSESLint.RuleListener>;
178
+ 'no-subscribe-handlers': TSESLint.RuleModule<"forbidden", readonly [], {
179
+ description: "Disallow passing handlers to `subscribe`.";
180
+ requiresTypeChecking: true;
181
+ }, TSESLint.RuleListener>;
182
+ 'no-subscribe-in-pipe': TSESLint.RuleModule<"forbidden", readonly [], {
183
+ description: "Disallow calling of `subscribe` within any RxJS operator inside a `pipe`.";
184
+ recommended: "recommended";
185
+ requiresTypeChecking: true;
186
+ }, TSESLint.RuleListener>;
187
+ 'no-topromise': TSESLint.RuleModule<"forbidden" | "suggestLastValueFromWithDefault" | "suggestLastValueFrom" | "suggestFirstValueFrom", readonly [], {
188
+ description: "Disallow use of the `toPromise` method.";
189
+ recommended: "recommended";
190
+ requiresTypeChecking: true;
191
+ }, TSESLint.RuleListener>;
192
+ 'no-unbound-methods': TSESLint.RuleModule<"forbidden", readonly [{
193
+ allowTypes?: string[];
194
+ }], {
195
+ description: "Disallow passing unbound methods.";
196
+ recommended: "recommended";
197
+ requiresTypeChecking: true;
198
+ }, TSESLint.RuleListener>;
199
+ 'no-unnecessary-collection': TSESLint.RuleModule<"forbidden", readonly [], {
200
+ description: "Disallow unnecessary usage of collection arguments with single values.";
201
+ recommended: "strict";
202
+ requiresTypeChecking: false;
203
+ }, TSESLint.RuleListener>;
204
+ 'no-unsafe-catch': TSESLint.RuleModule<"forbidden", readonly [{
205
+ observable?: string;
206
+ }], {
207
+ description: "Disallow unsafe `catchError` usage in effects and epics.";
208
+ requiresTypeChecking: true;
209
+ }, TSESLint.RuleListener>;
210
+ 'no-unsafe-first': TSESLint.RuleModule<"forbidden", readonly [{
211
+ observable?: string;
212
+ }], {
213
+ description: "Disallow unsafe `first`/`take` usage in effects and epics.";
214
+ requiresTypeChecking: true;
215
+ }, TSESLint.RuleListener>;
216
+ 'no-unsafe-subject-next': TSESLint.RuleModule<"forbidden", readonly [], {
217
+ description: "Disallow unsafe optional `next` calls.";
218
+ recommended: "recommended";
219
+ requiresTypeChecking: true;
220
+ }, TSESLint.RuleListener>;
221
+ 'no-unsafe-switchmap': TSESLint.RuleModule<"forbidden", readonly [{
222
+ allow?: string | string[];
223
+ disallow?: string | string[];
224
+ observable?: string;
225
+ }], {
226
+ description: "Disallow unsafe `switchMap` usage in effects and epics.";
227
+ requiresTypeChecking: true;
228
+ }, TSESLint.RuleListener>;
229
+ 'no-unsafe-takeuntil': TSESLint.RuleModule<"forbidden", readonly [{
230
+ alias?: string[];
231
+ allow?: string[];
232
+ }], {
233
+ description: "Disallow applying operators after `takeUntil`.";
234
+ recommended: "recommended";
235
+ requiresTypeChecking: true;
236
+ }, TSESLint.RuleListener>;
237
+ 'prefer-observer': TSESLint.RuleModule<"forbidden" | "suggest", readonly [{
238
+ allowNext?: boolean;
239
+ }], {
240
+ description: "Disallow passing separate handlers to `subscribe` and `tap`.";
241
+ recommended: "recommended";
242
+ requiresTypeChecking: true;
243
+ }, TSESLint.RuleListener>;
244
+ 'prefer-root-operators': TSESLint.RuleModule<"forbidden" | "suggest" | "forbiddenWithoutFix", readonly [], {
245
+ description: "Disallow importing operators from `rxjs/operators`.";
246
+ recommended: "recommended";
247
+ }, TSESLint.RuleListener>;
248
+ 'suffix-subjects': TSESLint.RuleModule<"forbidden" | "forbiddenProperty", readonly [{
249
+ parameters?: boolean;
250
+ properties?: boolean;
251
+ objects?: boolean;
252
+ suffix?: string;
253
+ types?: Record<string, boolean>;
254
+ variables?: boolean;
255
+ }], {
256
+ description: "Enforce the use of a suffix in subject identifiers.";
257
+ requiresTypeChecking: true;
258
+ }, TSESLint.RuleListener>;
259
+ 'throw-error': TSESLint.RuleModule<"forbidden" | "suggestErrorConstructor", readonly [{
260
+ allowThrowingAny?: boolean;
261
+ allowThrowingUnknown?: boolean;
262
+ }], {
263
+ description: "Enforce passing only `Error` values to `throwError` or `Subject.error`.";
264
+ recommended: {
265
+ recommended: true;
266
+ strict: [{
267
+ allowThrowingAny: boolean;
268
+ allowThrowingUnknown: boolean;
269
+ }];
270
+ };
271
+ requiresTypeChecking: true;
272
+ }, TSESLint.RuleListener>;
286
273
  };
287
274
  declare const rxjsX: {
288
- configs: {
289
- recommended: {
290
- name: "rxjs-x/recommended";
291
- plugins: {
292
- 'rxjs-x': ESLint.Plugin;
293
- };
294
- rules: {
295
- 'rxjs-x/no-async-subscribe': "error";
296
- 'rxjs-x/no-create': "error";
297
- 'rxjs-x/no-ignored-notifier': "error";
298
- 'rxjs-x/no-ignored-replay-buffer': "error";
299
- 'rxjs-x/no-ignored-takewhile-value': "error";
300
- 'rxjs-x/no-implicit-any-catch': "error";
301
- 'rxjs-x/no-index': "error";
302
- 'rxjs-x/no-internal': "error";
303
- 'rxjs-x/no-nested-subscribe': "error";
304
- 'rxjs-x/no-redundant-notify': "error";
305
- 'rxjs-x/no-sharereplay': "error";
306
- 'rxjs-x/no-subject-unsubscribe': "error";
307
- 'rxjs-x/no-subscribe-in-pipe': "error";
308
- 'rxjs-x/no-topromise': "error";
309
- 'rxjs-x/no-unbound-methods': "error";
310
- 'rxjs-x/no-unsafe-subject-next': "error";
311
- 'rxjs-x/no-unsafe-takeuntil': "error";
312
- 'rxjs-x/prefer-observer': "error";
313
- 'rxjs-x/prefer-root-operators': "error";
314
- 'rxjs-x/throw-error': "error";
315
- };
316
- };
317
- strict: {
318
- name: "rxjs-x/strict";
319
- plugins: {
320
- 'rxjs-x': ESLint.Plugin;
321
- };
322
- rules: {
323
- 'rxjs-x/no-async-subscribe': "error";
324
- 'rxjs-x/no-create': "error";
325
- 'rxjs-x/no-exposed-subjects': "error";
326
- 'rxjs-x/no-floating-observables': "error";
327
- 'rxjs-x/no-ignored-default-value': "error";
328
- 'rxjs-x/no-ignored-error': "error";
329
- 'rxjs-x/no-ignored-notifier': "error";
330
- 'rxjs-x/no-ignored-replay-buffer': "error";
331
- 'rxjs-x/no-ignored-takewhile-value': "error";
332
- 'rxjs-x/no-implicit-any-catch': ["error", {
333
- allowExplicitAny: false;
334
- }];
335
- 'rxjs-x/no-index': "error";
336
- 'rxjs-x/no-internal': "error";
337
- 'rxjs-x/no-misused-observables': "error";
338
- 'rxjs-x/no-nested-subscribe': "error";
339
- 'rxjs-x/no-redundant-notify': "error";
340
- 'rxjs-x/no-sharereplay-before-takeuntil': "error";
341
- 'rxjs-x/no-sharereplay': "error";
342
- 'rxjs-x/no-subclass': "error";
343
- 'rxjs-x/no-subject-unsubscribe': "error";
344
- 'rxjs-x/no-subscribe-in-pipe': "error";
345
- 'rxjs-x/no-topromise': "error";
346
- 'rxjs-x/no-unbound-methods': "error";
347
- 'rxjs-x/no-unnecessary-collection': "error";
348
- 'rxjs-x/no-unsafe-subject-next': "error";
349
- 'rxjs-x/no-unsafe-takeuntil': "error";
350
- 'rxjs-x/prefer-observer': "error";
351
- 'rxjs-x/prefer-root-operators': "error";
352
- 'rxjs-x/throw-error': ["error", {
353
- allowThrowingAny: false;
354
- allowThrowingUnknown: false;
355
- }];
356
- };
357
- };
358
- 'recommended-legacy': {
359
- plugins: ["rxjs-x"];
360
- rules: {
361
- 'rxjs-x/no-async-subscribe': "error";
362
- 'rxjs-x/no-create': "error";
363
- 'rxjs-x/no-ignored-notifier': "error";
364
- 'rxjs-x/no-ignored-replay-buffer': "error";
365
- 'rxjs-x/no-ignored-takewhile-value': "error";
366
- 'rxjs-x/no-implicit-any-catch': "error";
367
- 'rxjs-x/no-index': "error";
368
- 'rxjs-x/no-internal': "error";
369
- 'rxjs-x/no-nested-subscribe': "error";
370
- 'rxjs-x/no-redundant-notify': "error";
371
- 'rxjs-x/no-sharereplay': "error";
372
- 'rxjs-x/no-subject-unsubscribe': "error";
373
- 'rxjs-x/no-subscribe-in-pipe': "error";
374
- 'rxjs-x/no-topromise': "error";
375
- 'rxjs-x/no-unbound-methods': "error";
376
- 'rxjs-x/no-unsafe-subject-next': "error";
377
- 'rxjs-x/no-unsafe-takeuntil': "error";
378
- 'rxjs-x/prefer-observer': "error";
379
- 'rxjs-x/prefer-root-operators': "error";
380
- 'rxjs-x/throw-error': "error";
381
- };
382
- };
275
+ configs: {
276
+ recommended: {
277
+ name: "rxjs-x/recommended";
278
+ plugins: {
279
+ 'rxjs-x': ESLint.Plugin;
280
+ };
281
+ rules: {
282
+ 'rxjs-x/no-async-subscribe': "error";
283
+ 'rxjs-x/no-create': "error";
284
+ 'rxjs-x/no-ignored-notifier': "error";
285
+ 'rxjs-x/no-ignored-replay-buffer': "error";
286
+ 'rxjs-x/no-ignored-takewhile-value': "error";
287
+ 'rxjs-x/no-implicit-any-catch': "error";
288
+ 'rxjs-x/no-index': "error";
289
+ 'rxjs-x/no-internal': "error";
290
+ 'rxjs-x/no-nested-subscribe': "error";
291
+ 'rxjs-x/no-redundant-notify': "error";
292
+ 'rxjs-x/no-sharereplay': "error";
293
+ 'rxjs-x/no-subject-unsubscribe': "error";
294
+ 'rxjs-x/no-subscribe-in-pipe': "error";
295
+ 'rxjs-x/no-topromise': "error";
296
+ 'rxjs-x/no-unbound-methods': "error";
297
+ 'rxjs-x/no-unsafe-subject-next': "error";
298
+ 'rxjs-x/no-unsafe-takeuntil': "error";
299
+ 'rxjs-x/prefer-observer': "error";
300
+ 'rxjs-x/prefer-root-operators': "error";
301
+ 'rxjs-x/throw-error': "error";
302
+ };
383
303
  };
384
- meta: {
385
- name: string;
386
- version: string;
387
- namespace: string;
304
+ strict: {
305
+ name: "rxjs-x/strict";
306
+ plugins: {
307
+ 'rxjs-x': ESLint.Plugin;
308
+ };
309
+ rules: {
310
+ 'rxjs-x/no-async-subscribe': "error";
311
+ 'rxjs-x/no-create': "error";
312
+ 'rxjs-x/no-exposed-subjects': "error";
313
+ 'rxjs-x/no-floating-observables': "error";
314
+ 'rxjs-x/no-ignored-default-value': "error";
315
+ 'rxjs-x/no-ignored-error': "error";
316
+ 'rxjs-x/no-ignored-notifier': "error";
317
+ 'rxjs-x/no-ignored-replay-buffer': "error";
318
+ 'rxjs-x/no-ignored-takewhile-value': "error";
319
+ 'rxjs-x/no-implicit-any-catch': ["error", {
320
+ allowExplicitAny: false;
321
+ }];
322
+ 'rxjs-x/no-index': "error";
323
+ 'rxjs-x/no-internal': "error";
324
+ 'rxjs-x/no-misused-observables': "error";
325
+ 'rxjs-x/no-nested-subscribe': "error";
326
+ 'rxjs-x/no-redundant-notify': "error";
327
+ 'rxjs-x/no-sharereplay-before-takeuntil': "error";
328
+ 'rxjs-x/no-sharereplay': "error";
329
+ 'rxjs-x/no-subclass': "error";
330
+ 'rxjs-x/no-subject-unsubscribe': "error";
331
+ 'rxjs-x/no-subscribe-in-pipe': "error";
332
+ 'rxjs-x/no-topromise': "error";
333
+ 'rxjs-x/no-unbound-methods': "error";
334
+ 'rxjs-x/no-unnecessary-collection': "error";
335
+ 'rxjs-x/no-unsafe-subject-next': "error";
336
+ 'rxjs-x/no-unsafe-takeuntil': "error";
337
+ 'rxjs-x/prefer-observer': "error";
338
+ 'rxjs-x/prefer-root-operators': "error";
339
+ 'rxjs-x/throw-error': ["error", {
340
+ allowThrowingAny: false;
341
+ allowThrowingUnknown: false;
342
+ }];
343
+ };
388
344
  };
389
- /** Compatibility with `defineConfig` until https://github.com/typescript-eslint/typescript-eslint/issues/11543 is addressed. */
390
- rules: { [K in keyof typeof allRules]: (typeof allRules)[K] & Rule.RuleModule; };
345
+ };
346
+ meta: {
347
+ name: string;
348
+ version: string;
349
+ namespace: string;
350
+ }; /** Compatibility with `defineConfig` until https://github.com/typescript-eslint/typescript-eslint/issues/11543 is addressed. */
351
+ rules: { [K in keyof typeof allRules]: (typeof allRules)[K] & Rule.RuleModule };
391
352
  };
392
-
393
- export = rxjsX;
353
+ //#endregion
354
+ export { rxjsX as default };