jakji93 / airon-fitness

AIRON Fitness is an AI-powered fitness companion supporting your personal health journey by delivering customized fitness and meal plans tailored to your goals and preferences.
https://airon-fitness.onrender.com/
MIT License
3 stars 2 forks source link

Kenny/eslint setup #8

Closed kennyjhcheng closed 1 year ago

kennyjhcheng commented 1 year ago

Important scripts to know

pre-commit hook

Because .git configurations are local, I setup a script in our root directory /pre-commit-hook.sh which will setup the pre-commit hook for you locally. just run

chmod +x pre-commit-hook.sh
./pre-commit-hook.sh

Now, after every commit, eslint will be checked, if there are any errors, the commit will be stopped.

running eslint

In the /client, you can run these commands to either see what eslint errors there are, or automatically fix errors that can be auto-fixed. These scripts are specified in package.json

npm run eslint
npm run eslint:fix