Skip to content

Commit bb8fcbd

Browse files
feat(strict)!: add no-misused-observables to strict
1 parent fa5e846 commit bb8fcbd

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The package includes the following rules.
100100
| [no-implicit-any-catch](docs/rules/no-implicit-any-catch.md) | Disallow implicit `any` error parameters in `catchError` operators. | ✅ 🔒 | 🔧 | 💡 | 💭 | |
101101
| [no-index](docs/rules/no-index.md) | Disallow importing index modules. | ✅ 🔒 | | | | |
102102
| [no-internal](docs/rules/no-internal.md) | Disallow importing internal modules. | ✅ 🔒 | 🔧 | 💡 | | |
103-
| [no-misused-observables](docs/rules/no-misused-observables.md) | Disallow Observables in places not designed to handle them. | | | | 💭 | |
103+
| [no-misused-observables](docs/rules/no-misused-observables.md) | Disallow Observables in places not designed to handle them. | 🔒 | | | 💭 | |
104104
| [no-nested-subscribe](docs/rules/no-nested-subscribe.md) | Disallow calling `subscribe` within a `subscribe` callback. | ✅ 🔒 | | | 💭 | |
105105
| [no-redundant-notify](docs/rules/no-redundant-notify.md) | Disallow sending redundant notifications from completed or errored observables. | ✅ 🔒 | | | 💭 | |
106106
| [no-sharereplay](docs/rules/no-sharereplay.md) | Disallow unsafe `shareReplay` usage. | ✅ 🔒 | | | | |

docs/rules/no-misused-observables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Disallow Observables in places not designed to handle them (`rxjs-x/no-misused-observables`)
22

3+
💼 This rule is enabled in the 🔒 `strict` config.
4+
35
💭 This rule requires [type information](https://typescript-eslint.io/linting/typed-linting).
46

57
<!-- end auto-generated rule header -->

src/configs/strict.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const createStrictConfig = (
2222
}],
2323
'rxjs-x/no-index': 'error',
2424
'rxjs-x/no-internal': 'error',
25+
'rxjs-x/no-misused-observables': 'error',
2526
'rxjs-x/no-nested-subscribe': 'error',
2627
'rxjs-x/no-redundant-notify': 'error',
2728
'rxjs-x/no-sharereplay': 'error',

src/rules/no-misused-observables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const noMisusedObservablesRule = ruleCreator({
6565
meta: {
6666
docs: {
6767
description: 'Disallow Observables in places not designed to handle them.',
68+
recommended: 'strict',
6869
requiresTypeChecking: true,
6970
},
7071
messages: {

0 commit comments

Comments
 (0)