sahat / hackathon-starter

A boilerplate for Node.js web applications
MIT License
34.76k stars 8.14k forks source link

Implementing Lint-Staged for Prettier and ESLint #1171

Open nirmalhk7 opened 2 years ago

nirmalhk7 commented 2 years ago

I'd like to know if we should implement lint-staged in package.json: that way we'll be able to lint and prettify all files which are being changed.

If you deem this as a good idea, I'd like to take this up :smile:

sahat commented 2 years ago

That's a good idea.

YasharF commented 1 year ago

Added lint-stage with husky: https://github.com/sahat/hackathon-starter/commit/040728936c9faf7fda6af6904651013b8ae12870

I'm skipping prettier for now because its out-of-the-box rules are in conflict with the current lint rules. We would either need to restyle the entire project and change the current lint rules and/or add a bunch of overrides in .prettierrc to match the current style. @sahat let me know which way you would want to go.

umangpatel8123 commented 10 months ago

.prettierrc.json is also a good idea instead of eslint