Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

New rule: no-submodule-imports #3051

Closed
adidahiya opened this issue Jul 18, 2017 · 2 comments
Closed

New rule: no-submodule-imports #3051

adidahiya opened this issue Jul 18, 2017 · 2 comments

Comments

@adidahiya
Copy link
Contributor

adidahiya commented Jul 18, 2017

I'd like a new rule to disallow reaching into submodules in import paths. Similar to eslint-plugin-import/no-internal-modules (but we can't call it that since TypeScript has its own notion of "internal module").

// bad
import { Keys } from "@blueprintjs/core/dist/common";

// good
import { Keys } from "@blueprintjs/core";

with rule config

"no-submodule-imports": {
  "options": [
    "@blueprinjs/core"
  ]
}
@aervin
Copy link
Contributor

aervin commented Aug 2, 2017

Will this be very similar to the "import-blacklist" rule? If so, I think I could give it a try.

@ajafff
Copy link
Contributor

ajafff commented Aug 2, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants