jjm3x3 / AmazingRaceFantasy

https://amazing-race-fantasy.vercel.app
1 stars 2 forks source link

97 Update Eslint #99

Open internette opened 1 month ago

internette commented 1 month ago

Updated ESLint and created a git hook that enables autoformatting on git commit, focused on the following file formats:

Background: The .git file cannot be committed, so we needed to create a new place to store custom hooks. The approaches:

  1. Add a npm package like Husky or Pre-commit
  2. Write a custom script to change the git hooks path

The best option seemed like a custom bash script. The script identifies if the engineer has Git version >=2.9 because the simplest command requires such. After the check, the script runs the appropriate command to set git's hook location local to this project.

I've also created an npm script in package.json for setup:gitHooks that makes the hooks executable and runs that script mentioned above. I've also added a setup command to set up the hooks and run npm install as a basic setup for this repo.

In this process, I've also migrated the ESLint config, since our previous implementation is now deprecated.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
amazing-race-fantasy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 8:17pm