Skip to content
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: install and init husky and commitlint #625

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

nikomakela
Copy link
Contributor

KK-1347.

The Git commits should be linted and the code changes should be tested before the commit is committed.

  • Installed Husky as a pre commit tool.
  • Installed commitlint as a tool to check the conventional commit format.
  • Installed lint-staged as a tool to gather the staged git files.

Used this as a guide:
https://theodorusclarence.com/shorts/husky-commitlint-prettier.

@terovirtanen
Copy link
Contributor

KUKKUU-UI branch is deployed to platta: https://kukkuu-ui-pr625.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kukkuu-ui-pr625.dev.hel.ninja 😆🎉🎉🎉

@nikomakela nikomakela force-pushed the KK-1347-precommit-tools branch from f686551 to c8a31ac Compare January 2, 2025 11:36
KK-1347.

The Git commits should be linted and the code changes should be tested
before the commit is committed.

- Installed Husky as a pre commit tool.
- Installed commitlint as a tool to check the conventional commit
format.
- Installed lint-staged as a tool to gather the staged git files.

Used this as a guide:
https://theodorusclarence.com/shorts/husky-commitlint-prettier.
KK-1347.

Install doctoc as development dependency. Run the doctoc during the
pre-commit process.
@nikomakela nikomakela force-pushed the KK-1347-precommit-tools branch from c8a31ac to 80cb248 Compare January 2, 2025 12:09
KK-1347.

Updated the code styling by running `lint-staged`, that runs `yarn
format:code` and `yarn format:scss`.
@terovirtanen
Copy link
Contributor

KUKKUU-UI branch is deployed to platta: https://kukkuu-ui-pr625.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kukkuu-ui-pr625.dev.hel.ninja 😆🎉🎉🎉

@nikomakela nikomakela force-pushed the KK-1347-precommit-tools branch from 481c4b4 to 1a09cfb Compare January 2, 2025 14:15
@terovirtanen
Copy link
Contributor

KUKKUU-UI branch is deployed to platta: https://kukkuu-ui-pr625.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kukkuu-ui-pr625.dev.hel.ninja 😆🎉🎉🎉

@karisal-anders karisal-anders self-requested a review January 3, 2025 07:04
@karisal-anders
Copy link
Contributor

karisal-anders commented Jan 3, 2025

Doctoc is verbose by default and can take pages just saying that it didn't find anything to update, but it seems there's no normal way to make it less verbose as there's thlorenz/doctoc#261

Copy link

sonarqubecloud bot commented Jan 3, 2025

Copy link
Contributor

@karisal-anders karisal-anders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes made by doctoc are left as unstaged changes after the commit has been made, which is not ideal, maybe adding a "Doctoc and how it works"-section or something like that into the README.md and documenting how it works currently would be a transparent way to handle this.

@terovirtanen
Copy link
Contributor

KUKKUU-UI branch is deployed to platta: https://kukkuu-ui-pr625.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kukkuu-ui-pr625.dev.hel.ninja 😆🎉🎉🎉

@nikomakela
Copy link
Contributor Author

The changes made by doctoc are left as unstaged changes after the commit has been made, which is not ideal, maybe adding a "Doctoc and how it works"-section or something like that into the README.md and documenting how it works currently would be a transparent way to handle this.

I'll add something about the pre-commit hooks in this City-of-Helsinki/kukkuu-admin#302 and this #632.

@nikomakela nikomakela merged commit e05edfe into master Jan 3, 2025
21 checks passed
@nikomakela nikomakela deleted the KK-1347-precommit-tools branch January 3, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants