chore: add TypeScript styles and norms#24
Conversation
- simple-import-sort - some manual fixes for any
- Eslint: Don't use `{}` as a type.
|
@sergioramos moved eslint rules to |
|
Should we use pre-commit to automate the enforcement of these guidelines? |
- See https://blog.typicode.com/husky-git-hooks-autoinstall/ for more info Fix `lint:check` command
|
My two cents: I've always preferred pre-push hooks (rather than pre-commit) so that making local commits is instant but your code is always nicely formatted and linted by the time anyone else would have to look at it. |
|
@danvk I like that also. You are right, the local commits would be slower. I will update to use a |
|
Added pre-push that runs |
sehyod
left a comment
There was a problem hiding this comment.
Looks good to me, thank you for this! I made a comment about lint-staged, that I think we can remove, but nothing blocking
| "eslint-plugin-react-hooks": "^4.6.0", | ||
| "eslint-plugin-simple-import-sort": "^10.0.0", | ||
| "husky": "^8.0.0", | ||
| "lint-staged": "^13.2.0", |
There was a problem hiding this comment.
Do we still need lint-staged if we only setup pre-push hooks?
Add recommended rules from #18
I've also added the .
/vscode/settings.jsonand ./vscode/extensions.jsonwith recommended settings. It makes easier to comply with rules after a git clone.