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

Add setting for specifying internal module directories #914

Closed
wants to merge 1 commit into from

Conversation

Whoaa512
Copy link

Closes #807

@coveralls
Copy link

coveralls commented Aug 15, 2017

Coverage Status

Coverage increased (+0.01%) to 96.004% when pulling f2f689c on Whoaa512:custom-internal-modules into cd77133 on benmosher:master.

Whoaa512 added a commit to fictiv/eslint-config-fictiv that referenced this pull request Aug 21, 2017
@jjshammas
Copy link

Any movement on this? Would love to have this feature so we can properly order the import/order rule.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should this setting interact with https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md and other rules?

Please add tests for any impacted rules, ideally both a valid and an invalid one.

@Whoaa512
Copy link
Author

I don't have time to work on this in the next few months.

@jjshammas Feel free to pick it up and make the necessary changes.

@ljharb
Copy link
Member

ljharb commented Feb 23, 2018

@jjshammas please don’t make a duplicate PR; either post a link here to your branch and i can pull in the commits, or, @Whoaa512 can add you as a collaborator on their fork, and you can make changes directly there.

@stramel
Copy link

stramel commented May 15, 2018

@ljharb Did you have any thought or preference on how you think it should handle no-internal-modules?

@ljharb
Copy link
Member

ljharb commented May 15, 2018

@stramel I'm not sure - it's probably a lot of complexity, and I think that the research needs to be done before making a change here.

@robatwilliams
Copy link

Matching using folder name startsWith wouldn't identify an internal module imported from a sibling: ../anInternalModule. Does it need to do something similar to isExternalPath?

New setting needs to be documented in the readme, and linked to from the "related" section of the order rule's docs page, as has been done with the import/external-module-folders setting.

@rodrigobdz
Copy link
Contributor

@stramel Did you gain any insights into how to handle no-internal-modules?

@JuHwon
Copy link

JuHwon commented Jun 25, 2019

fyi: this implementation does not work, when configuring internal-module-folders with something like src/. src/ will still be recognized as external module.

@benmosher
Copy link
Member

closing on account of staleness + I would rather not add global settings just for this, would prefer the suggestion in this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

import/order fails to recognize internal import groups
9 participants