-
-
Notifications
You must be signed in to change notification settings - Fork 106
feat: Implement standardized formatting. Closes #4 #78
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
Conversation
@nzakas @jesusprubio My suggestion on modernising the formatting in regards to issue #4 . Can you give feedback and/or merge? 😺 |
I've already updated the repo to format with ESLint on precommit. Is there any benefit to adding Prettier on top of what's already on |
As far as i can see, it runs |
I don’t see adding Prettier as providing much additional value at this point. ESLint can enforce the most important parts on precommit. I’d rather stick with one tool right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about this some more, I’m 👍
I think your point about the audience of the package potentially being people with less JS experience is valid and we should do what we can to help them. Just left a couple notes.
Co-authored-by: Nicholas C. Zakas <[email protected]>
@nzakas i included the correct lint-staged and suggested changes. I also fixed all the problems arising from using eslint:recommended config (code cleanup) and re-wrote from commonjs to modules, to get the most pleasing and maintainable code quality. It should be very good for the future pull requests, so i suggest we merge this one in first. |
@MarkKragerup it’s considered a best practice to keep each pull request narrowly focused on just one change. By bundling all of these changes together, it makes the decision all-or-nothing. This pull request should just be about adding Prettier. If you’d like to propose switching to ESM, please open a separate issue or pull request. |
@nzakas 100% agree on the best practise. This PR was adding prettier and the recommended eslint config. When I changed the commands it didnt allow for linting problems. Many problems had to do with require. I bet it was due to a wrong config ln my part, but I eagerly changed to ESM. If you want, I will rewrite it again - but ESM is preferable in my eyes, and more typescript ready, should the occasion arise. |
I’d say just start with the changes related to prettier and we can discuss ESM elsewhere. |
To save time, I updated this myself. |
This PR implements;
For readabiliy this PR does not:
This can be a seperate PR.