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

husky+lint-staged で eslint --fix をコミット時に実行する #1168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Feb 6, 2025

husky+lint-staged でコミット時に *.ts ファイルを自動整形する

see EC-CUBE/ec-cube#4661

  • 基本は上記4系のPRを踏襲
  • 以下の方法は husky v5 以降使えなくなったようなので、 .husky/pre-commit を使用する
"husky": {
    "hooks": {
      "pre-commit": "lint-staged 2>&1 | echo || node -e ''"
    }
  },
  • lint-staged 2>&1 | echo が動作しないため lint-staged -q に変更

refs EC-CUBE/ec-cube#6337

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.07%. Comparing base (f52f6e2) to head (4991990).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1168   +/-   ##
=======================================
  Coverage   50.07%   50.07%           
=======================================
  Files          82       82           
  Lines       10583    10583           
=======================================
  Hits         5299     5299           
  Misses       5284     5284           
Flag Coverage Δ
tests 50.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant