You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ban-operators)!: type check, report in place (#25)
BREAKING CHANGE: this rule now requires typed linting.
- Resolves#7 . Reworked `ban-operators` to support banning operators
imported from root "rxjs" too.
- This uses typed linting to actually check the operator's type instead
of just reading the import statement. This was done based on the
original maintainer's comments in the unit tests indicating this was
necessary.
- Also resolves upstream
cartant#96 . Banned
operators are now reported at the area they're used in the code instead
of the import statement.
- This allows developers to `eslint-disable-next-line` to allow banned
operators more precisely.
- This also resolves the only blocker before #8 can be worked.
- NOTE: this only runs inside of `pipe()` due to performance reasons.
- If users still want to completely ban an operator via its import, they
can use the built-in ESLint rule `no-restricted-imports` (or the
typescript-eslint equivalent `@typescript-eslint/no-restircted-imports`)
with the `importNames` names option.
- Technically users could also use `ban-observables`, since that rule
doesn't distinguish between operators and static creation function
exported from "rxjs"...
0 commit comments