-
Notifications
You must be signed in to change notification settings - Fork 30
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
Codemod unnamed default exports to have names #117
Conversation
Yeah, I might have accidentally bumped up the |
Should we also add the |
This makes debugging that much easier when functions have names instead of just being <anonymous>. Using facebook/create-react-app#8924 (comment)
7e5548c
to
4fad168
Compare
@danburzo Fixed the FIXMEs, I honestly hadn't even noticed them. Might've been a bug in the codemod script – good catch anyway! Re the Eslint plugin, yeah, sounds like a good idea... I tried looking through https://github.com/benmosher/eslint-plugin-import 's readme but couldn't find a matching rule. I can set the tooling up if you give me a pointer as to what plugin/rule to set up:) |
Thanks! I'll take a stab at it with the eslint plugin, many of the rules there may be useful. |
I've enabled a couple of rules from the |
Just to make sure you're not doing too much work upfront: if the changes are related to TypeScript, please be aware that culori is intentionally a JavaScript, not a TypeScript, project. (One TypeScripty thing we can do in this repository is maintain a |
You may have guessed right... 😅 What's the reason for not being (or allowing being) TypeScript? The built umd/cjs library would be (nearly - I checked) exactly the same, and compiled ESM modules could also be shipped in NPM packages with no sweat. |
In a nutshell: the various trade-offs of a change in tech/tooling do not currently offer a net benefit to this project. We made the aesthetic choice of keeping everything as simple as possible, with minimal tooling. |
@danburzo Okay, I can dig that, no worries. If you want to take a peek, there's a mostly-complete conversion over at master...akx:ts :) I'll see if I could neatly extract .d.ts out of that – I originally started this to get better Culori interop for my https://github.com/akx/gradient project (and there's a small partial .d.ts in there). |
This makes debugging that much easier when functions have names instead of just being anonymous. This is a prelude for an, ahem, slightly larger changeset.
Also, many files had been left untouched by
pretty-quick
/Prettier before, so the first commit runs that so the diff for the codemod commit is smaller.The
jscodeshift
script I used was facebook/create-react-app#8924 (comment)