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

feat: husky+commitlintを使ってコミットメッセージにlintを実行する #88

Merged
merged 5 commits into from
Aug 17, 2021

Conversation

kgsi
Copy link
Contributor

@kgsi kgsi commented Aug 17, 2021

課題・背景

  • feat: huskyとcommitlintを追加 #61
    • こちらのPRを再作成
    • commitlintを設定して、conventional commitsのルールに従っていない場合はコミットできないようにしたい

やったこと

  • commitlintの設定
  • huskyの設定

やらなかったこと

動作確認

conventional commitsのメッセージルールに従わずコミットした場合、lint errorが出ること。

CleanShot 2021-08-17 at 10 36 42

@kgsi kgsi requested review from diescake and mkmn August 17, 2021 01:40
@diescake
Copy link
Contributor

亜〜〜 先にライブラリアップデートマージしちゃったのでコンフリクトしてしまった…🙏🙏

@diescake
Copy link
Contributor

みています〜 👁️

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit ""
Copy link
Contributor

@diescake diescake Aug 17, 2021

Choose a reason for hiding this comment

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

[おきもち]

SmartHR はyarn勢なので、yarnと書いた方が〜〜と思いましたが、

$ yarn commitlint --edit ""

特にtextlint-rule-preset-smarthrの開発環境では明示されていなかったのでヨシ!!、という気持ちになりました!

diescake
diescake previously approved these changes Aug 17, 2021
Copy link
Contributor

@diescake diescake left a comment

Choose a reason for hiding this comment

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

GoGo!!🎉🎉

@kgsi
Copy link
Contributor Author

kgsi commented Aug 17, 2021

@diescake コンフリクト起きており、解消したので再度レビューお願いしますmm

Copy link
Contributor

@diescake diescake left a comment

Choose a reason for hiding this comment

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

あざます!Re:LGTM!!🎉🎉

@kgsi kgsi merged commit 61d5fb8 into kufu:main Aug 17, 2021
@kgsi kgsi deleted the add-husky-commit branch August 17, 2021 06:28
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.

2 participants