Jiseoup/showmycodePublic
EN|KO
  • 코드
  • 커밋
  • 풀 리퀘스트
← 목록으로
Merged

chore: introduce coding conventions and reformat codebase

#8
JiseoupJiseoup · 2026년 5월 4일chore/coding-conventions → main
chore
개요커밋변경된 파일

Related Issue

N/A — proactive tooling improvement.

Changes

Codify the project's code conventions through tooling, and expose npm scripts that CI/CD can call directly in a follow-up.

  • Prettier with prettier-plugin-tailwindcss for deterministic Tailwind class ordering. Config: printWidth: 100, double quotes, semicolons, LF line endings, trailingComma: "all".
  • commitlint config (@commitlint/config-conventional with i18n type added) to validate PR titles. Workflow is not enabled in this PR — a follow-up PR will add it.
  • .editorconfig and .gitattributes for IDE/Git consistency across contributors (especially Windows).
  • .git-blame-ignore-revs so contributors can skip the bulk-format commit in git blame. The squash SHA will be appended in a follow-up PR (it cannot be known until this PR merges).
  • New npm scripts in package.json: format, format:check, typecheck, lint:fix, commitlint.
  • CONTRIBUTING.md — added "Code Conventions", "Local Verification", and "git blame hygiene" sections. Fixed dictionaries/ → locales/ path typo.
  • PR template — added checkboxes for format:check, typecheck, and Conventional Commits title. (This PR introduces the new template, so its checklist may differ from older PRs.)
  • CLAUDE.md — listed the new npm scripts and added a pointer to CONTRIBUTING.md.
  • Bulk format pass — applied npm run format to the whole codebase (31 files). Mostly Tailwind class reordering plus minor wrap/trailing-comma adjustments. No behavioral changes.

Wiring CI is intentionally left out of this PR. Once merged, two steps in .github/workflows/ci.yml complete the gate:

- name: Format check
  run: npm run format:check

- name: Type check
  run: npm run typecheck

How to Verify

  1. npm install
  2. npm run format:check → All matched files use Prettier code style!
  3. npm run lint → passes with no warnings
  4. npm run typecheck → passes (already strict: true)
  5. npm run build → succeeds
  6. Smoke-test commitlint:
echo "feat: bogus"  | npx commitlint   # passes
echo "weird: bogus" | npx commitlint   # fails (type-enum)
echo "i18n: add ja" | npx commitlint   # passes (validates the override)
  1. Open any component (e.g. components/RepoCard.tsx) and confirm Tailwind classes are sorted by the plugin.

Checklist

  • npm run format:check passes
  • npm run lint passes
  • npm run typecheck passes
  • npm run build passes
  • PR title follows Conventional Commits (feat:, fix:, chore:, refactor:, docs:, test:, )
i18n: