Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The package includes the following rules.
| [no-connectable](docs/rules/no-connectable.md) | Disallow operators that return connectable observables. | | | | 💭 | |
| [no-create](docs/rules/no-create.md) | Disallow the static `Observable.create` function. | ✅ 🔒 | | | 💭 | |
| [no-cyclic-action](docs/rules/no-cyclic-action.md) | Disallow cyclic actions in effects and epics. | | | | 💭 | |
| [no-explicit-generics](docs/rules/no-explicit-generics.md) | Disallow unnecessary explicit generic type arguments. | 🔒 | | | | |
| [no-explicit-generics](docs/rules/no-explicit-generics.md) | Disallow unnecessary explicit generic type arguments. | | | | | |
| [no-exposed-subjects](docs/rules/no-exposed-subjects.md) | Disallow public and protected subjects. | 🔒 | | | 💭 | |
| [no-finnish](docs/rules/no-finnish.md) | Disallow Finnish notation. | | | | 💭 | |
| [no-floating-observables](docs/rules/no-floating-observables.md) | Require Observables to be handled appropriately. | 🔒 | | | 💭 | |
Expand Down
6 changes: 4 additions & 2 deletions docs/rules/no-explicit-generics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Disallow unnecessary explicit generic type arguments (`rxjs-x/no-explicit-generics`)

💼 This rule is enabled in the 🔒 `strict` config.

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

This rule prevents the use of explicit type arguments when the type arguments can be inferred.
Expand All @@ -21,3 +19,7 @@ Examples of **correct** code for this rule:
import { BehaviorSubject } from "rxjs";
const subject = new BehaviorSubject(42);
```

## Known problems

- ([#77](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/issues/77)) Type unions cause false positives e.g. `new BehaviorSubject<number | null>(null)` will be incorrectly caught by this rule.
1 change: 0 additions & 1 deletion src/configs/strict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const createStrictConfig = (
rules: {
'rxjs-x/no-async-subscribe': 'error',
'rxjs-x/no-create': 'error',
'rxjs-x/no-explicit-generics': 'error',
'rxjs-x/no-exposed-subjects': 'error',
'rxjs-x/no-floating-observables': 'error',
'rxjs-x/no-ignored-default-value': 'error',
Expand Down
1 change: 0 additions & 1 deletion src/rules/no-explicit-generics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const noExplicitGenericsRule = ruleCreator({
meta: {
docs: {
description: 'Disallow unnecessary explicit generic type arguments.',
recommended: 'strict',
},
messages: {
forbidden: 'Explicit generic type arguments are forbidden.',
Expand Down
Loading