New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@teamsparta/commitlint-config

Package Overview
Dependencies
Maintainers
21
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@teamsparta/commitlint-config

Team Sparta's shared commitlint config

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
0
Maintainers
21
Weekly downloads
 
Created
Source

@teamsparta/commitlint-config

커밋 메시지에 대한 규칙을 검사하기 위해 사용하는 공용 commitlint 설정입니다.

1) 설치

pnpm add -D @teamsparta/commitlint-config @commitlint/cli @commitlint/config-conventional husky
yarn add -D @teamsparta/commitlint-config @commitlint/cli @commitlint/config-conventional husky

2) 기본 설정 파일 추가

루트에 commitlint.config.cjs 파일을 생성하고 아래와 같이 작성함으로서 프로젝트가 이 규칙으로 커밋 메시지를 검사해야 하도록 합니다.

module.exports = {
  extends: ['@teamsparta/commitlint-config'],
};

3) 커밋 시점에 메시지를 검사하기 위한 Git 훅 연동

3-1) 이미 Husky가 있는 경우(.husky 존재)

아래 중 하나를 선택해 적용하세요.

  • 파일이 이미 있을 때(중복 없이 한 줄 추가):
grep -q 'commitlint --edit' .husky/commit-msg || printf '\n# commitlint\nnpx --no-install commitlint --edit "$1"\n' >> .husky/commit-msg
chmod +x .husky/commit-msg
  • 파일이 없을 때(새로 생성):
printf '#!/usr/bin/env sh\n. "$(dirname -- "$0")/_/husky.sh"\n\nnpx --no-install commitlint --edit "$1"\n' > .husky/commit-msg
chmod +x .husky/commit-msg

3-2) Husky가 없는 경우(.husky 없음)

먼저 Husky를 초기화하고, commit-msg 훅을 생성합니다.

pnpm dlx husky-init && pnpm install
printf '#!/usr/bin/env sh\n. "$(dirname -- "$0")/_/husky.sh"\n\nnpx --no-install commitlint --edit "$1"\n' > .husky/commit-msg
chmod +x .husky/commit-msg

이제 git commit을 실행할 때마다 Commitlint가 메시지를 검사합니다. 규칙을 어기면 커밋이 실패합니다.

4) 규칙 요약

  • 허용되는 타입
    • feat, fix, hotfix,chore, docs, refactor,design, style, test
  • 제목 길이: 최대 50자 권고(초과 시 경고)
  • subject-case: 자유(대소문자 규칙 강제 안 함)

5) 동작 예시

# 통과하는 커밋
git commit -m "feat: 로그인 버튼 추가"

# 실패하는 커밋(허용되지 않은 type)
git commit -m "update: 로그인 버튼 추가"

참고

  • 규칙 상세는 이 패키지의 index.js를 참고하세요.
  • 다른 레포에서 사용 시, 위 설치/설정 단계를 그대로 따르면 됩니다.
  • Conventional Commits 문서: https://www.conventionalcommits.org/ko/v1.0.0/

빠른 복붙 섹션

commitlint.config.cjs

module.exports = { extends: ['@teamsparta/commitlint-config'] };

.husky/commit-msg

npx --no-install commitlint --edit "$1"

Keywords

commitlint

FAQs

Package last updated on 08 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts