Skip to content

Commit 7e8f4e3

Browse files
committed
chore : eslint 설정 수정
1 parent 62193d9 commit 7e8f4e3

File tree

6 files changed

+154
-76
lines changed

6 files changed

+154
-76
lines changed

apps/web/eslint.config.mjs

Lines changed: 0 additions & 16 deletions
This file was deleted.

apps/webview/eslint.config.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

apps/webview/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"scripts": {
88
"dev": "vite",
99
"build": "tsc -b && vite build",
10-
"lint": "eslint . --ext .ts,.tsx",
11-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"lint": "eslint . --ext .ts,.tsx"
1212
},
1313
"devDependencies": {
1414
"@eslint/js": "^9.21.0",

eslint.config.js

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,63 @@ import typescriptParser from "@typescript-eslint/parser";
55

66
export default defineConfig([
77
{
8+
files: ["apps/web/**/*.{ts,tsx}"],
89
languageOptions: {
9-
parser: typescriptParser, // 정확한 파서 객체 지정
10+
parser: typescriptParser,
1011
parserOptions: {
1112
ecmaFeatures: { jsx: true },
1213
ecmaVersion: 2021,
1314
sourceType: "module",
1415
},
15-
globals: {
16-
React: "readonly",
17-
},
1816
},
17+
plugins: [
18+
"react",
19+
"react-hooks",
20+
"@typescript-eslint",
21+
"prettier",
22+
"jsx-a11y",
23+
"next",
24+
],
1925
extends: [
20-
"eslint:recommended", // 기본 ESLint 규칙
21-
"plugin:react/recommended", // React 관련 규칙
22-
"plugin:@typescript-eslint/recommended", // TypeScript 관련 규칙
23-
"plugin:prettier/recommended", // Prettier와 충돌 방지 및 스타일 적용
26+
"eslint:recommended",
27+
"plugin:@typescript-eslint/recommended",
28+
"plugin:react/recommended",
29+
"plugin:react-hooks/recommended",
30+
"plugin:jsx-a11y/recommended",
31+
"plugin:prettier/recommended",
32+
"plugin:next/core-web-vitals", // ✅ 요거 중요함 Next.js용
2433
],
25-
plugins: ["react", "@typescript-eslint", "prettier"],
2634
rules: {
27-
"prettier/prettier": "error", // Prettier 규칙을 ESLint 규칙으로 처리
35+
"prettier/prettier": "error",
2836
},
2937
},
3038
{
31-
// TypeScript 파일에만 적용될 규칙
32-
files: ["*.ts", "*.tsx"],
39+
files: ["apps/webview/**/*.{ts,tsx}"],
40+
languageOptions: {
41+
parser: typescriptParser,
42+
parserOptions: {
43+
ecmaFeatures: { jsx: true },
44+
ecmaVersion: 2021,
45+
sourceType: "module",
46+
},
47+
},
48+
plugins: [
49+
"react",
50+
"react-hooks",
51+
"@typescript-eslint",
52+
"prettier",
53+
"jsx-a11y",
54+
],
55+
extends: [
56+
"eslint:recommended",
57+
"plugin:@typescript-eslint/recommended",
58+
"plugin:react/recommended",
59+
"plugin:react-hooks/recommended",
60+
"plugin:jsx-a11y/recommended",
61+
"plugin:prettier/recommended",
62+
],
3363
rules: {
34-
"@typescript-eslint/no-unused-vars": "warn",
64+
"prettier/prettier": "error",
3565
},
3666
},
3767
]);

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
"devDependencies": {
66
"@types/react": "^19.1.5",
77
"@types/react-dom": "^19.1.5",
8-
"@typescript-eslint/eslint-plugin": "^8.29.1",
9-
"@typescript-eslint/parser": "^8.29.1",
10-
"eslint": "^9.24.0",
11-
"eslint-config-prettier": "^10.1.2",
8+
"@typescript-eslint/eslint-plugin": "^8.32.1",
9+
"@typescript-eslint/parser": "^8.32.1",
10+
"eslint": "^9.27.0",
11+
"eslint-config-prettier": "^10.1.5",
1212
"eslint-define-config": "^2.1.0",
1313
"eslint-plugin-jsx-a11y": "^6.10.2",
14+
"eslint-plugin-next": "^0.0.0",
1415
"eslint-plugin-prettier": "^5.2.6",
1516
"eslint-plugin-react": "^7.37.5",
1617
"eslint-plugin-react-hooks": "^5.2.0",

yarn.lock

Lines changed: 104 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,13 @@ __metadata:
262262
languageName: node
263263
linkType: hard
264264

265+
"@eslint/config-helpers@npm:^0.2.1":
266+
version: 0.2.2
267+
resolution: "@eslint/config-helpers@npm:0.2.2"
268+
checksum: 10c0/98f7cefe484bb754674585d9e73cf1414a3ab4fd0783c385465288d13eb1a8d8e7d7b0611259fc52b76b396c11a13517be5036d1f48eeb877f6f0a6b9c4f03ad
269+
languageName: node
270+
linkType: hard
271+
265272
"@eslint/core@npm:^0.12.0":
266273
version: 0.12.0
267274
resolution: "@eslint/core@npm:0.12.0"
@@ -280,6 +287,15 @@ __metadata:
280287
languageName: node
281288
linkType: hard
282289

290+
"@eslint/core@npm:^0.14.0":
291+
version: 0.14.0
292+
resolution: "@eslint/core@npm:0.14.0"
293+
dependencies:
294+
"@types/json-schema": "npm:^7.0.15"
295+
checksum: 10c0/259f279445834ba2d2cbcc18e9d43202a4011fde22f29d5fb802181d66e0f6f0bd1f6b4b4b46663451f545d35134498231bd5e656e18d9034a457824b92b7741
296+
languageName: node
297+
linkType: hard
298+
283299
"@eslint/eslintrc@npm:^3.0.0, @eslint/eslintrc@npm:^3.3.1":
284300
version: 3.3.1
285301
resolution: "@eslint/eslintrc@npm:3.3.1"
@@ -304,6 +320,13 @@ __metadata:
304320
languageName: node
305321
linkType: hard
306322

323+
"@eslint/js@npm:9.27.0":
324+
version: 9.27.0
325+
resolution: "@eslint/js@npm:9.27.0"
326+
checksum: 10c0/79b219ceda79182732954b52f7a494f49995a9a6419c7ae0316866e324d3706afeb857e1306bb6f35a4caaf176a5174d00228fc93d36781a570d32c587736564
327+
languageName: node
328+
linkType: hard
329+
307330
"@eslint/object-schema@npm:^2.1.6":
308331
version: 2.1.6
309332
resolution: "@eslint/object-schema@npm:2.1.6"
@@ -321,6 +344,16 @@ __metadata:
321344
languageName: node
322345
linkType: hard
323346

347+
"@eslint/plugin-kit@npm:^0.3.1":
348+
version: 0.3.1
349+
resolution: "@eslint/plugin-kit@npm:0.3.1"
350+
dependencies:
351+
"@eslint/core": "npm:^0.14.0"
352+
levn: "npm:^0.4.1"
353+
checksum: 10c0/a75f0b5d38430318a551b83e27bee570747eb50beeb76b03f64b0e78c2c27ef3d284cfda3443134df028db3251719bc0850c105f778122f6ad762d5270ec8063
354+
languageName: node
355+
linkType: hard
356+
324357
"@humanfs/core@npm:^0.19.1":
325358
version: 0.19.1
326359
resolution: "@humanfs/core@npm:0.19.1"
@@ -977,7 +1010,7 @@ __metadata:
9771010
languageName: node
9781011
linkType: hard
9791012

980-
"@typescript-eslint/eslint-plugin@npm:8.29.1, @typescript-eslint/eslint-plugin@npm:^8.29.1":
1013+
"@typescript-eslint/eslint-plugin@npm:8.29.1":
9811014
version: 8.29.1
9821015
resolution: "@typescript-eslint/eslint-plugin@npm:8.29.1"
9831016
dependencies:
@@ -998,7 +1031,7 @@ __metadata:
9981031
languageName: node
9991032
linkType: hard
10001033

1001-
"@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0":
1034+
"@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/eslint-plugin@npm:^8.32.1":
10021035
version: 8.32.1
10031036
resolution: "@typescript-eslint/eslint-plugin@npm:8.32.1"
10041037
dependencies:
@@ -1019,7 +1052,7 @@ __metadata:
10191052
languageName: node
10201053
linkType: hard
10211054

1022-
"@typescript-eslint/parser@npm:8.29.1, @typescript-eslint/parser@npm:^8.29.1":
1055+
"@typescript-eslint/parser@npm:8.29.1":
10231056
version: 8.29.1
10241057
resolution: "@typescript-eslint/parser@npm:8.29.1"
10251058
dependencies:
@@ -1035,7 +1068,7 @@ __metadata:
10351068
languageName: node
10361069
linkType: hard
10371070

1038-
"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0":
1071+
"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/parser@npm:^8.32.1":
10391072
version: 8.32.1
10401073
resolution: "@typescript-eslint/parser@npm:8.32.1"
10411074
dependencies:
@@ -2287,14 +2320,14 @@ __metadata:
22872320
languageName: node
22882321
linkType: hard
22892322

2290-
"eslint-config-prettier@npm:^10.1.2":
2291-
version: 10.1.2
2292-
resolution: "eslint-config-prettier@npm:10.1.2"
2323+
"eslint-config-prettier@npm:^10.1.5":
2324+
version: 10.1.5
2325+
resolution: "eslint-config-prettier@npm:10.1.5"
22932326
peerDependencies:
22942327
eslint: ">=7.0.0"
22952328
bin:
22962329
eslint-config-prettier: bin/cli.js
2297-
checksum: 10c0/c22c8e29193cc8fd70becf1c2dd072513f2b3004a175c2a49404c79d1745ba4dc0edc2afd00d16b0e26d24f95813a0469e7445a25104aec218f6d84cdb1697e9
2330+
checksum: 10c0/5486255428e4577e8064b40f27db299faf7312b8e43d7b4bc913a6426e6c0f5950cd519cad81ae24e9aecb4002c502bc665c02e3b52efde57af2debcf27dd6e0
22982331
languageName: node
22992332
linkType: hard
23002333

@@ -2406,6 +2439,13 @@ __metadata:
24062439
languageName: node
24072440
linkType: hard
24082441

2442+
"eslint-plugin-next@npm:^0.0.0":
2443+
version: 0.0.0
2444+
resolution: "eslint-plugin-next@npm:0.0.0"
2445+
checksum: 10c0/2b2b1ca99e3144e0ec801b6d8818d41363497eb5ef50cc402e66effb9030e6c038f6dcbdf5d2804d16c826c75d022bcde2dcd84b490eb2b42a87e25eb82631e9
2446+
languageName: node
2447+
linkType: hard
2448+
24092449
"eslint-plugin-prettier@npm:^5.2.6":
24102450
version: 5.2.6
24112451
resolution: "eslint-plugin-prettier@npm:5.2.6"
@@ -2505,7 +2545,7 @@ __metadata:
25052545
languageName: node
25062546
linkType: hard
25072547

2508-
"eslint@npm:^9.0.0, eslint@npm:^9.21.0, eslint@npm:^9.24.0":
2548+
"eslint@npm:^9.0.0, eslint@npm:^9.21.0":
25092549
version: 9.24.0
25102550
resolution: "eslint@npm:9.24.0"
25112551
dependencies:
@@ -2555,6 +2595,56 @@ __metadata:
25552595
languageName: node
25562596
linkType: hard
25572597

2598+
"eslint@npm:^9.27.0":
2599+
version: 9.27.0
2600+
resolution: "eslint@npm:9.27.0"
2601+
dependencies:
2602+
"@eslint-community/eslint-utils": "npm:^4.2.0"
2603+
"@eslint-community/regexpp": "npm:^4.12.1"
2604+
"@eslint/config-array": "npm:^0.20.0"
2605+
"@eslint/config-helpers": "npm:^0.2.1"
2606+
"@eslint/core": "npm:^0.14.0"
2607+
"@eslint/eslintrc": "npm:^3.3.1"
2608+
"@eslint/js": "npm:9.27.0"
2609+
"@eslint/plugin-kit": "npm:^0.3.1"
2610+
"@humanfs/node": "npm:^0.16.6"
2611+
"@humanwhocodes/module-importer": "npm:^1.0.1"
2612+
"@humanwhocodes/retry": "npm:^0.4.2"
2613+
"@types/estree": "npm:^1.0.6"
2614+
"@types/json-schema": "npm:^7.0.15"
2615+
ajv: "npm:^6.12.4"
2616+
chalk: "npm:^4.0.0"
2617+
cross-spawn: "npm:^7.0.6"
2618+
debug: "npm:^4.3.2"
2619+
escape-string-regexp: "npm:^4.0.0"
2620+
eslint-scope: "npm:^8.3.0"
2621+
eslint-visitor-keys: "npm:^4.2.0"
2622+
espree: "npm:^10.3.0"
2623+
esquery: "npm:^1.5.0"
2624+
esutils: "npm:^2.0.2"
2625+
fast-deep-equal: "npm:^3.1.3"
2626+
file-entry-cache: "npm:^8.0.0"
2627+
find-up: "npm:^5.0.0"
2628+
glob-parent: "npm:^6.0.2"
2629+
ignore: "npm:^5.2.0"
2630+
imurmurhash: "npm:^0.1.4"
2631+
is-glob: "npm:^4.0.0"
2632+
json-stable-stringify-without-jsonify: "npm:^1.0.1"
2633+
lodash.merge: "npm:^4.6.2"
2634+
minimatch: "npm:^3.1.2"
2635+
natural-compare: "npm:^1.4.0"
2636+
optionator: "npm:^0.9.3"
2637+
peerDependencies:
2638+
jiti: "*"
2639+
peerDependenciesMeta:
2640+
jiti:
2641+
optional: true
2642+
bin:
2643+
eslint: bin/eslint.js
2644+
checksum: 10c0/135d301e37cd961000a9c1d3f0e1863bed29a61435dfddedba3db295973193024382190fd8790a8de83777d10f450082a29eaee8bc9ce0fb1bc1f2b0bb882280
2645+
languageName: node
2646+
linkType: hard
2647+
25582648
"espree@npm:^10.0.1, espree@npm:^10.3.0":
25592649
version: 10.3.0
25602650
resolution: "espree@npm:10.3.0"
@@ -4719,12 +4809,13 @@ __metadata:
47194809
dependencies:
47204810
"@types/react": "npm:^19.1.5"
47214811
"@types/react-dom": "npm:^19.1.5"
4722-
"@typescript-eslint/eslint-plugin": "npm:^8.29.1"
4723-
"@typescript-eslint/parser": "npm:^8.29.1"
4724-
eslint: "npm:^9.24.0"
4725-
eslint-config-prettier: "npm:^10.1.2"
4812+
"@typescript-eslint/eslint-plugin": "npm:^8.32.1"
4813+
"@typescript-eslint/parser": "npm:^8.32.1"
4814+
eslint: "npm:^9.27.0"
4815+
eslint-config-prettier: "npm:^10.1.5"
47264816
eslint-define-config: "npm:^2.1.0"
47274817
eslint-plugin-jsx-a11y: "npm:^6.10.2"
4818+
eslint-plugin-next: "npm:^0.0.0"
47284819
eslint-plugin-prettier: "npm:^5.2.6"
47294820
eslint-plugin-react: "npm:^7.37.5"
47304821
eslint-plugin-react-hooks: "npm:^5.2.0"

0 commit comments

Comments
 (0)