Skip to content

Commit 09c7128

Browse files
feat(no-sharereplay-before-takeuntil): add to strict config
1 parent 6559ef7 commit 09c7128

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
@@ -104,7 +104,7 @@ The package includes the following rules.
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. | ✅ 🔒 | | | | |
107-
| [no-sharereplay-before-takeuntil](docs/rules/no-sharereplay-before-takeuntil.md) | Disallow using `shareReplay({ refCount: false })` before `takeUntil`. | | | | | |
107+
| [no-sharereplay-before-takeuntil](docs/rules/no-sharereplay-before-takeuntil.md) | Disallow using `shareReplay({ refCount: false })` before `takeUntil`. | 🔒 | | | | |
108108
| [no-subclass](docs/rules/no-subclass.md) | Disallow subclassing RxJS classes. | 🔒 | | | 💭 | |
109109
| [no-subject-unsubscribe](docs/rules/no-subject-unsubscribe.md) | Disallow calling the `unsubscribe` method of subjects. | ✅ 🔒 | | | 💭 | |
110110
| [no-subject-value](docs/rules/no-subject-value.md) | Disallow accessing the `value` property of a `BehaviorSubject` instance. | | | | 💭 | |

docs/rules/no-sharereplay-before-takeuntil.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Disallow using `shareReplay({ refCount: false })` before `takeUntil` (`rxjs-x/no-sharereplay-before-takeuntil`)
22

3+
💼 This rule is enabled in the 🔒 `strict` config.
4+
35
<!-- end auto-generated rule header -->
46

57
This rule effects failures if the `shareReplay` operator is used without its reference counting behavior

src/configs/strict.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const createStrictConfig = (
2525
'rxjs-x/no-misused-observables': 'error',
2626
'rxjs-x/no-nested-subscribe': 'error',
2727
'rxjs-x/no-redundant-notify': 'error',
28+
'rxjs-x/no-sharereplay-before-takeuntil': 'error',
2829
'rxjs-x/no-sharereplay': 'error',
2930
'rxjs-x/no-subclass': 'error',
3031
'rxjs-x/no-subject-unsubscribe': 'error',

src/rules/no-sharereplay-before-takeuntil.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const noSharereplayBeforeTakeuntilRule = ruleCreator({
88
meta: {
99
docs: {
1010
description: 'Disallow using `shareReplay({ refCount: false })` before `takeUntil`.',
11+
recommended: 'strict',
1112
},
1213
messages: {
1314
forbidden: 'shareReplay before takeUntil is forbidden unless \'refCount: true\' is specified.',

0 commit comments

Comments
 (0)