-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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": "^7.32.2", | ||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
and ./vscode/extensions.json
with recommended settings. It makes easier to comply with rules after a git clone.