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.
@@ -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` config.
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 | `false` |
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 forbidden.
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
  {
@@ -1,6 +1,6 @@
1
1
  # Disallow importing index modules (`rxjs-x/no-index`)
2
2
 
3
- 💼 This rule is enabled in the ✅ `recommended` config.
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 importing internal modules (`rxjs-x/no-internal`)
2
2
 
3
- 💼 This rule is enabled in the ✅ `recommended` config.
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` config.
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` config.
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 `shareReplay` usage (`rxjs-x/no-sharereplay`)
2
2
 
3
- 💼 This rule is enabled in the ✅ `recommended` config.
3
+ 💼 This rule is enabled in the following configs: ✅ `recommended`, 🔒 `strict`.
4
4
 
5
5
  <!-- end auto-generated rule header -->
6
6
 
@@ -1,5 +1,7 @@
1
1
  # Disallow subclassing RxJS classes (`rxjs-x/no-subclass`)
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 calling the `unsubscribe` method of subjects (`rxjs-x/no-subject-unsubscribe`)
2
2
 
3
- 💼 This rule is enabled in the ✅ `recommended` config.
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,7 +1,15 @@
1
1
  # Disallow use of the `toPromise` method (`rxjs-x/no-topromise`)
2
2
 
3
+ 💼 This rule is enabled in the 🔒 `strict` config.
4
+
5
+ 💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
6
+
3
7
  💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
4
8
 
5
9
  <!-- end auto-generated rule header -->
6
10
 
7
11
  This rule effects failures if the `toPromise` method is used.
12
+
13
+ ## Further reading
14
+
15
+ - [Conversion to Promises](https://rxjs.dev/deprecations/to-promise)
@@ -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` config.
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` config.
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` config.
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)
@@ -0,0 +1,34 @@
1
+ # Disallow importing operators from `rxjs/operators` (`rxjs-x/prefer-root-operators`)
2
+
3
+ 💼 This rule is enabled in the 🔒 `strict` config.
4
+
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
+
7
+ <!-- end auto-generated rule header -->
8
+
9
+ This rule prevents importing from the `rxjs/operators` export site.
10
+ Most operators were moved to the `rxjs` export site in RxJS v7.2.0
11
+ (excepting a few old and deprecated operators).
12
+ The `rxjs/operators` export site has since been deprecated and will be removed in a future major version.
13
+
14
+ Note that because a few operators were renamed or not migrated to the `rxjs` export site,
15
+ this rule may not provide an automatic fixer if renaming the import path is not guaranteed to be safe.
16
+ See the documentation linked below.
17
+
18
+ ## Rule details
19
+
20
+ Examples of **incorrect** code for this rule:
21
+
22
+ ```ts
23
+ import { map } from 'rxjs/operators';
24
+ ```
25
+
26
+ Examples of **correct** code for this rule:
27
+
28
+ ```ts
29
+ import { map } from 'rxjs';
30
+ ```
31
+
32
+ ## Further reading
33
+
34
+ - [Importing instructions](https://rxjs.dev/guide/importing)
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-rxjs-x",
3
3
  "type": "commonjs",
4
- "version": "0.3.1",
4
+ "version": "0.4.0",
5
5
  "packageManager": "yarn@4.5.1+sha512.341db9396b6e289fecc30cd7ab3af65060e05ebff4b3b47547b278b9e67b08f485ecd8c79006b405446262142c7a38154445ef7f17c1d5d1de7d90bf9ce7054d",
6
6
  "description": "ESLint v9+ plugin for RxJS",
7
7
  "author": "Jason Weinzierl <weinzierljason@gmail.com>",
@@ -84,9 +84,9 @@
84
84
  "eslint-config-flat-gitignore": "^0.3.0",
85
85
  "eslint-doc-generator": "^1.7.1",
86
86
  "eslint-import-resolver-typescript": "^3.6.3",
87
- "eslint-plugin-eslint-plugin": "^6.3.1",
87
+ "eslint-plugin-eslint-plugin": "^6.3.2",
88
88
  "eslint-plugin-import-x": "^4.4.2",
89
- "eslint-plugin-n": "^17.13.1",
89
+ "eslint-plugin-n": "^17.13.2",
90
90
  "markdownlint-cli2": "^0.15.0",
91
91
  "rxjs": "^7.8.1",
92
92
  "tsup": "^8.3.5",