9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
4.5 KiB
4.5 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-eslint-plugin-prettier | eslint-plugin-prettier | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
eslint-plugin-prettier
매 한 줄
"매 Prettier 의 formatting 결과를 ESLint rule 로 노출". 매 Prettier 가 보는 차이를 lint error 로 reporting — 매 같은 IDE/CI 에서 lint 와 format 을 한 흐름으로. 2026 현재는
eslint --fixintegration 보다 flat config + Prettier 3 + format-only on save 가 권장.
매 핵심
매 동작 원리
eslint-plugin-prettier는 Prettier 를 ESLint rule 처럼 실행 — file 의 expected output 과 actual content 를 비교해 diff 를 lint error 로 보고.- Rule key:
prettier/prettier—--fix시 Prettier 가 직접 rewrite. - 항상
eslint-config-prettier와 함께 사용 (ESLint 의 stylistic rules off).
매 2026 권장 stack
- Format: Prettier 3.x — IDE save 또는 git pre-commit hook 에서 직접 실행.
- Lint: ESLint 9 flat config — 매 logic / type-aware rules.
- 결합:
eslint-config-prettier만 적용 (rule conflict off).eslint-plugin-prettier는 선택 — CI 에서만 사용 권장.
매 응용
- Monorepo CI 에서
eslint --max-warnings=0으로 format drift 감지. - Pre-commit
lint-staged와 결합해 staged file 만 빠르게 검사. - Editor 가 Prettier 미설치인 contributor 의 PR 에서 catch.
💻 패턴
Flat config (ESLint 9 + Prettier 3, 2026 표준)
// eslint.config.js
import prettierPlugin from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import js from '@eslint/js';
export default [
js.configs.recommended,
prettierConfig, // turns off conflicting rules
{
plugins: { prettier: prettierPlugin },
rules: {
'prettier/prettier': ['error', { singleQuote: true, semi: true }],
},
},
];
Recommended preset
import prettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
prettierRecommended, // includes plugin + config + rule
];
Pre-commit (lint-staged + husky)
// package.json
{
"lint-staged": {
"*.{js,ts,tsx}": ["eslint --fix", "prettier --write"]
}
}
CI gate
# .github/workflows/lint.yml
- run: pnpm prettier --check .
- run: pnpm eslint .
Programmatic check
import { ESLint } from 'eslint';
const eslint = new ESLint({ fix: false });
const results = await eslint.lintFiles(['src/**/*.ts']);
const formatter = await eslint.loadFormatter('stylish');
console.log(formatter.format(results));
매 결정 기준
| 상황 | Approach |
|---|---|
| 매 contributor 가 Prettier 셋업 보장 안 됨 | eslint-plugin-prettier 도입 → CI gate |
| 매 모두 IDE save-on-format + pre-commit | plugin 없이 prettier --check 만 |
| Monorepo + 다양한 language | Prettier CLI 직접 + plugin 생략 (속도 ↑) |
| Editor lint = error 표시가 필요 | plugin 활성 |
기본값: eslint-config-prettier 만 사용 + Prettier 는 별도 실행. plugin 은 형식 drift 감지용 CI 에서 한정 적용.
🔗 Graph
- 부모: ESLint · Prettier
- 변형: eslint-config-prettier
- 응용: lint-staged · husky · CI_CD_Pipeline
- Adjacent: Code-Quality · DevSecOps_Framework
🤖 LLM 활용
언제: 매 Prettier output 과 lint output 을 한 reporter 로 통합해야 할 때 — 특히 monorepo CI 에서. 언제 X: 매 small repo 이고 contributor 가 Prettier IDE plugin 사용. plugin 의 overhead (Prettier 를 매 lint 에서 invoke) 가 불필요.
❌ 안티패턴
- Stylistic ESLint rule 과 plugin 동시 사용:
eslint-config-prettier미적용 → 무한 충돌. --fix의존 only: editor 가 fix 안 해주면 broken state 유지. Prettier 직접 실행이 빠르고 명확.- Plugin 으로 모든 file 검사: 매 large repo 에서 ESLint+Prettier 동시 invoke 는 느림.
lint-staged로 scope.
🧪 검증 / 중복
- Verified (eslint-plugin-prettier README v5.x, Prettier 3 docs, ESLint 9 flat config docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — full content with flat config + 2026 권장 stack |