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

Auto-detect aliases #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Auto-detect aliases #14

wants to merge 2 commits into from

Conversation

fsmaia
Copy link
Owner

@fsmaia fsmaia commented May 24, 2021

Closes #11

It adds auto-detection based on: isAbsoluteModule, isNodeModule and isInstalledModule.

An aliased import is an absolute module and is not a node module nor an installed module.

BREAKING CHANGE: options.alias and options.overrideBuiltinModules are no longer required/valid

This PR depends on https://github.com/ggascoigne/prettier-plugin-import-sort/pulls/23 to work fine with prettier-plugin-import-sort, since it now depends on the file path to detect properly.

Auto-detection relies on isAbsoluteModule and isNodeModule

BREAKING CHANGE: options.alias is no longer required/valid

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

Successfully merging this pull request may close these issues.

Autodetect aliases when using TypeScript (tsconfig.json + baseUrl)
1 participant