|
| 1 | +{ |
| 2 | + "plugins": ["react", "@typescript-eslint", "unused-imports", "sort-exports"], |
| 3 | + "extends": [ |
| 4 | + "eslint:recommended", |
| 5 | + "plugin:@typescript-eslint/recommended", |
| 6 | + "next/core-web-vitals", |
| 7 | + "prettier" |
| 8 | + ], |
| 9 | + "parser": "@typescript-eslint/parser", |
| 10 | + "parserOptions": { |
| 11 | + "ecmaVersion": 2021, |
| 12 | + "sourceType": "module" |
| 13 | + }, |
| 14 | + "rules": { |
| 15 | + /* 2개의 스페이스를 들여쓰기에 사용합니다. */ |
| 16 | + "indent": ["error", 2], |
| 17 | + |
| 18 | + /* 작은따옴표('')를 문자열에 사용합니다. */ |
| 19 | + "quotes": ["error", "single"], |
| 20 | + |
| 21 | + "react-hooks/exhaustive-deps": "off", |
| 22 | + |
| 23 | + /* 사용되지 않는 변수를 경고로 표시합니다. */ |
| 24 | + "no-unused-vars": "error", |
| 25 | + |
| 26 | + /* 디버깅용 로그문(console.log)을 사용할 수 있도록 허용합니다. */ |
| 27 | + "no-console": "error", |
| 28 | + |
| 29 | + /* 사용하지 않는 import문을 제거합니다. */ |
| 30 | + "unused-imports/no-unused-imports-ts": ["error"], |
| 31 | + |
| 32 | + "sort-exports/sort-exports": ["error"], |
| 33 | + |
| 34 | + "no-restricted-imports": [ |
| 35 | + "error", |
| 36 | + { |
| 37 | + "patterns": ["../"] |
| 38 | + } |
| 39 | + ], |
| 40 | + |
| 41 | + "arrow-body-style": ["error", "as-needed"], |
| 42 | + "react/self-closing-comp": ["error", { "component": true, "html": true }], |
| 43 | + "@typescript-eslint/consistent-type-imports": [ |
| 44 | + "error", |
| 45 | + { |
| 46 | + "prefer": "type-imports" |
| 47 | + } |
| 48 | + ], |
| 49 | + "import/order": [ |
| 50 | + "error", |
| 51 | + { |
| 52 | + "groups": [ |
| 53 | + "builtin", |
| 54 | + "external", |
| 55 | + "internal", |
| 56 | + "parent", |
| 57 | + "sibling", |
| 58 | + "index", |
| 59 | + "object", |
| 60 | + "type" |
| 61 | + ], |
| 62 | + "pathGroups": [ |
| 63 | + { |
| 64 | + "pattern": "react", |
| 65 | + "group": "external", |
| 66 | + "position": "before" |
| 67 | + }, |
| 68 | + { |
| 69 | + "pattern": "next/**", |
| 70 | + "group": "external", |
| 71 | + "position": "before" |
| 72 | + }, |
| 73 | + { |
| 74 | + "pattern": "@emotion/**", |
| 75 | + "group": "external", |
| 76 | + "position": "before" |
| 77 | + }, |
| 78 | + { |
| 79 | + "pattern": "./**", |
| 80 | + "group": "sibling", |
| 81 | + "position": "after" |
| 82 | + }, |
| 83 | + { |
| 84 | + "pattern": "@/**", |
| 85 | + "group": "sibling", |
| 86 | + "position": "after" |
| 87 | + }, |
| 88 | + { |
| 89 | + "pattern": "client/**", |
| 90 | + "group": "internal", |
| 91 | + "position": "before" |
| 92 | + }, |
| 93 | + { |
| 94 | + "pattern": "admin/**", |
| 95 | + "group": "internal", |
| 96 | + "position": "before" |
| 97 | + }, |
| 98 | + { |
| 99 | + "pattern": "api/**", |
| 100 | + "group": "internal", |
| 101 | + "position": "before" |
| 102 | + }, |
| 103 | + { |
| 104 | + "pattern": "common", |
| 105 | + "group": "internal", |
| 106 | + "position": "before" |
| 107 | + } |
| 108 | + ], |
| 109 | + "alphabetize": { "order": "asc" }, |
| 110 | + "newlines-between": "always", |
| 111 | + "pathGroupsExcludedImportTypes": ["extanal", "admin"] |
| 112 | + } |
| 113 | + ] |
| 114 | + } |
| 115 | +} |
0 commit comments