captain-fact icon indicating copy to clipboard operation
captain-fact copied to clipboard

Add automatic code formatting to pre-commit

Open Vayel opened this issue 6 years ago • 2 comments

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.

Vayel avatar Mar 18 '19 13:03 Vayel

@Betree what does src mean here? I can't see any src directory.

Should I just run the hook on app/**/*.{js,jsx}?

Vayel avatar Mar 19 '19 09:03 Vayel

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.

Betree avatar Mar 20 '19 22:03 Betree