{ "name": "Code Style Rules", "description": "일관된 코드 스타일을 유지하기 위한 규칙", "rules": { "indentation": { "type": "spaces", "size": 2 }, "maxLineLength": 100, "namingConventions": { "variables": "camelCase", "functions": "camelCase", "classes": "PascalCase", "constants": "UPPER_SNAKE_CASE", "interfaces": "PascalCase", "typeAliases": "PascalCase", "enums": "PascalCase", "enumMembers": "PascalCase", "generics": "PascalCase", "privateMembers": "_camelCase", "booleanVariables": "isPrefixOrHasSuffix", "testFiles": "{name}.test.{ext} 또는 {name}.spec.{ext}" }, "imports": { "order": ["external", "internal", "relative"], "groupBy": true }, "comments": { "fileHeader": { "required": true, "format": [ "/**", " * @file {filename}", " * @description {파일의 주요 목적과 기능 설명}", " * @author {작성자}", " * @date {작성일}", " * @version {버전}", " */" ] }, "classHeader": { "required": true, "format": [ "/**", " * @class {클래스명}", " * @description {클래스의 주요 목적과 책임 설명}", " * @example {사용 예시 코드}", " */" ] }, "methodHeader": { "required": true, "format": [ "/**", " * @method {메서드명}", " * @description {메서드의 주요 기능 설명}", " * @param {파라미터명} {파라미터 설명}", " * @returns {반환값 설명}", " * @throws {발생 가능한 예외 설명}", " * @example {사용 예시 코드}", " */" ] }, "inlineComments": { "whenToUse": [ "복잡한 비즈니스 로직 설명", "알고리즘 단계 설명", "비표준 코드 설명", "성능 최적화 설명" ], "format": "// {설명}" }, "todoComments": { "format": "// TODO: {할 일 설명} - {담당자} - {예상 완료일}", "requiredFields": ["description", "assignee", "dueDate"] }, "sectionComments": { "format": [ "// ============================================================================", "// {섹션 제목}", "// ============================================================================" ], "whenToUse": [ "주요 기능 그룹 구분", "파일 내 논리적 섹션 구분" ] }, "documentation": { "api": { "required": true, "format": [ "/**", " * @api {method} {path} {title}", " * @apiDescription {설명}", " * @apiParam {type} {name} {설명}", " * @apiSuccess {type} {name} {설명}", " * @apiError {type} {name} {설명}", " */" ] }, "types": { "required": true, "format": [ "/**", " * @typedef {Object} {TypeName}", " * @property {type} {propertyName} {설명}", " */" ] } } }, "languageSpecific": { "typescript": { "strictNullChecks": true, "noImplicitAny": true, "preferInterface": false, "strictFunctionTypes": true, "useUnknownOverAny": true, "useTypeAssertions": "as Type 방식 사용", "importTypeFrom": "type { Type } from 'module'" }, "javascript": { "preferConst": true, "useStrict": true, "moduleSystem": "ESM", "optionalChaining": true, "nullishCoalescing": true }, "python": { "indentation": 4, "maxLineLength": 88, "stringQuotes": "\"\"\"", "importStyle": "from module import Class, function", "typeHints": "모든 함수에 사용", "docstringStyle": "Google" } }, "formatters": { "eslint": { "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended" ], "rules": { "no-console": "warn", "prefer-const": "error", "no-unused-vars": "warn", "react/prop-types": "off", "react/react-in-jsx-scope": "off" } }, "prettier": { "printWidth": 100, "tabWidth": 2, "useTabs": false, "semi": true, "singleQuote": true, "quoteProps": "as-needed", "trailingComma": "es5", "bracketSpacing": true, "arrowParens": "always" } }, "formattingTriggers": { "onSave": true, "preCommit": true, "inCI": true, "changedFilesOnly": true, "automaticFixing": true } } }