Open hwaterke opened 7 years ago
Sure, it will would be great to have a PR to clean the code.
var
. I don't really see the benefits of using const
or let
tbh. Can't remember a bug because of var. But ok.dist
. I think we need to provide that for people using the lib, otherwise they need to integrate a typescript compiler in their workflowAlright cool, I'm gonna start working on it then.
To elaborate a bit on your points:
var
has a so called function scope
which is unintuitive to many developers. This easily leads to bugs for unexperienced developers. let
and const
have block scopes which is more common in other languages and therefore used properly by most developers.dist
folder definitely needs to be shipped when publishing on npm but I would not have it under source control. It adds noise to PRs and increases the size of the code base for no real benefit. Ideally the package.json
is configured to build before pushing to npm and the dist folder is in your .gitignore
. I can work on that too if you want. Also, if someone send a PR but forgot to build first, dist
and src
will be out of sync.Cool. Yes to all.
Re prettier, I'm happy to use it as consistent formatting is quite important and removes discussions about it.
The workflow around dist
would be great to have. Agree that PRs are terribly noisy because of this.
Thanks
I just submitted https://github.com/Versent/redux-crud/pull/62 as a first step. The whole code went through prettier. I'll wait for this to be merged before moving on the the next step in order to avoid awful merge conflicts.
I'll probably tackle the build script next to get rid of the dist
folder asap.
Hey,
This is probably a bit of a strange request but while working on my last PR on this project a few things triggered my OCD.
For example:
var
is used everywhere instead ofconst
/let
It is not crucial but would you welcome a PR for this ? :P Have you ever considered using prettier to format the code in a consistent way?
I was also wondering why you commit the build on Github? (
dist
folder)Let me know what you think!
H.