captain-fact
captain-fact copied to clipboard
Add automatic code formatting to pre-commit
User story
Code formatting for front-end is to be done manually, which is a bit painful. Instead, it should be done automatically.
Best solution for this problem
Run prettier during the pre-commit hook.
@Betree what does src mean here? I can't see any src directory.
Should I just run the hook on app/**/*.{js,jsx}?
That sounds like a misconfiguration from https://github.com/CaptainFact/captain-fact-frontend/pull/224
app/**/*.{js,jsx} is fine, we can also add cypress/**/*.{js,jsx} too but that's not a requirement.