Closed joshi-kaushal closed 2 years ago
@Mayank0255 I was trying to add precommit hook using husky but the solutions I tried didn't work. Can you please check if you can do something at your end or provide good documentation?
@joshi-kaushal Thank you for the PR, but I think I will be putting the eslint config onhold for now as I will be doing it myself most probably as I have some requirements and based on future scope of this project, and eslint config might interrupt the building process. I hope you understand
You should have updated the issue likewise or at least told me to stop working on it :)
@joshi-kaushal Actually that issue initially was assigned to me and there wasn't a label of hacktoberfest on it too, but after you asked I thought that you might do a good job but then I forgot that my code is following certain conventions already, among which most of them are violating the eslint default config, and this project had husky pre commit before but I removed that as it was causing issues while setting up so after you added husky too I decided to put it on hold.
I hope you understand.
Stale pull request message
Description
Configured the project with ESLint and Prettier. It solves issue #51.
How to validate
There are three scripts associated with this:
npm run lint
: checks the entire codebase and looks for linting issues.npm run lint:fix
: fixes possible linting issuesnpm run format
: checks the entire codebase and prettifies the code.Things to know
You might receive an error while executing ESLint related issues on Windows systems but that's a problem with how NodeJS runs NPM scripts. It's working fine on WSL but not on Git Bash or Powershell. So it's really nothing to worry about.
This answer explains my point well: https://github.com/eslint/eslint/issues/7933#issuecomment-273269297 Also look at these: