Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] prefer-rxjs replace rxjs/operators with rxjs #77

Closed
JounQin opened this issue Jul 15, 2021 · 2 comments
Closed

[feature request] prefer-rxjs replace rxjs/operators with rxjs #77

JounQin opened this issue Jul 15, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@JounQin
Copy link

JounQin commented Jul 15, 2021

See ReactiveX/rxjs#6488

@cartant cartant added the enhancement New feature or request label Jul 17, 2021
@cartant
Copy link
Owner

cartant commented Jul 17, 2021

A rule that flags imports from "rxjs/operators" as failures would be very easy, but writing fixers for rules is somewhat tedious. I'll probably add this eventually, but it's not near the top of my list of things to do.

Actually, even a rule without a fixer is fairly complicated, as there are a handful of deprecated operators still need to be imported from "rxjs/operators".

@JounQin
Copy link
Author

JounQin commented Sep 12, 2021

I finish up by using core rule no-restricted-imports

{
  "rules": {
    "no-restricted-imports": [
      2,
      {
        "paths": [
          {
            "name": "rxjs/operators",
            "message": "Please use top level `rxjs` directly instead."
          }
        ]
      }
    ]
  }
}

@JounQin JounQin closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants