Adding flags to use implicit defaults and wildcard folders#55
Adding flags to use implicit defaults and wildcard folders#55toddtarsi wants to merge 10 commits into
Conversation
Yes, please. |
|
The current PR is a mess. It would probably be easier to force push just the changes. |
|
@gajus - Done and done. Also, I rebased all the 644 commits down to one. Sorry about that! |
gajus
left a comment
There was a problem hiding this comment.
- Needs to have tests.
- Please remove package-lock.json https://dev.to/gajus/stop-using-package-lock-json-or-yarn-lock-3ddi
| First extension will always be preferred to homonyms | ||
| with another allowed extension. | ||
| [array] [default: ["js"]] | ||
| --implicitDefault, -m Uses defaults as implicit instead of named. |
There was a problem hiding this comment.
Please use dashes for CLI program parameters, i.e. --implicit-default.
There was a problem hiding this comment.
@gajus - Are you sure? I was following the convention outlined in ignoreDirectories and ignoreUnsafe.
There was a problem hiding this comment.
Right. That should not have been the case originally. Please keep the convention. I will release a breaking change later.
There was a problem hiding this comment.
@gajus - Sounds good. If everything else is okay, I'll make some tests over the next couple days to check for any funny business between the various flags.
There was a problem hiding this comment.
What is the status of this PR? I would love this change.
|
@gajus - Thanks for reviewing this. I added everything but the hyphen delimiters and the tests. I'll look at the tests a little later. If you still want the hyphen delimiters, I can do that as well, but I saw an existing convention further back in the repo. |
I found an issue in the recurse logic. This tool creates a bunch of named exports. It can recurse. It grabs default exports normally. This means it has issues recursing itself because it's not grabbing the child folder's named exports. It's resolved by using wildcard characters on folders. I don't want to mess with existing stuff, so it's an optional flag.
Also, I added a flag so defaults could be made implicit instead of explicit. More OCD than anything.
Thanks for the great tool and if you don't want to incorporate this stuff, let me know. Thanks!
Also, I can change the file permissions and gitignore back np.