When starting or scaffolding any project, set up formatting, linting, import sorting, type checking, and pre-commit hooks before writing application code. This prevents the painful scenario of adding these tools later and facing thousands of lines of formatting changes in a single commit.
Determine the project type from existing files or the scaffolding context:
| pyproject.toml, setup.py, requirements.txt, .py files | Python | | package.json, tsconfig.json, .ts/.js/.tsx files | JavaScript/TypeScript | | Both present | Monorepo — configure each ecosystem separately |
스캐폴딩하거나 새 프로젝트를 시작할 때 형식 지정, 린팅, 가져오기 정렬, 유형 확인 및 사전 커밋 후크를 설정합니다. 새 프로젝트 생성, 리포지토리 초기화, 앱 스캐폴딩 또는 사용자가 기존 프로젝트에 린팅/형식 추가를 요청할 때마다 이 기술을 사용하세요. 트리거: "새 프로젝트", "스캐폴드", "초기화", "linting 설정", "포맷터 추가", "사전 커밋 후크 추가", "생물 군계 구성", "러프 구성". 목표는 처음부터 코드 품질 도구를 확립하여 나중에 고통스러운 대량 수정이 아닌 점진적으로 문제를 포착하는 것입니다. 출처: rarestg/rarestg-skills.