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

Suggestion: replace custom file path resolver with globby #770

Closed
NickHeiner opened this issue Feb 23, 2021 · 5 comments
Closed

Suggestion: replace custom file path resolver with globby #770

NickHeiner opened this issue Feb 23, 2021 · 5 comments

Comments

@NickHeiner
Copy link

I see that the current file path resolver manually traverses directories, and hardcodes to exclude some directories, like node_modules.

I suggest using a third-party solution like globby instead. This automatically gives functionality like more sophisticated patterns, or pattern exclusions. And it reduces the amount of code in this project.

And, instead of hardcoding directories to ignore, I'd recommend reading the user's gitignore and just ignoring everything there.

@eventualbuddha
Copy link
Collaborator

Thank you for another good suggestion 😄 I agree, and would likewise be happy to review a PR or help whoever wants to get started on this. I may have time to get to this and #771, but not in the immediate future.

@NickHeiner
Copy link
Author

Sounds good. And while I'm in here, would you mind if I submitted PRs to use other sorts of third-party libs, like using yargs instead of a manual args parser?

@eventualbuddha
Copy link
Collaborator

If there's a clear benefit to using the 3rd party libs in terms of improved functionality or reduced complexity or performance improvements or similar, and the libs are popular and maintained, then that's fine.

@eventualbuddha
Copy link
Collaborator

Fixed by #772, but also kinda reverted in #875.

@NickHeiner
Copy link
Author

For what it's worth, I also addressed this in https://github.com/NickHeiner/jscodemod.

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

Successfully merging a pull request may close this issue.

2 participants