From 73fd59f90c8d96e2ca5fc33c9a5bf6cabfadd906 Mon Sep 17 00:00:00 2001 From: jungwoo3490 Date: Tue, 10 Sep 2024 00:34:36 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix(ui):=20vitest=20lint=20=EC=84=B8?= =?UTF-8?q?=ED=8C=85=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/eslint-config-custom/package.json | 3 +- .../eslint-config-custom/react-internal.js | 1 - packages/ui/.eslintrc.js | 8 +- turbo.json | 4 +- yarn.lock | 80 ++++++++++++++++++- 5 files changed, 91 insertions(+), 5 deletions(-) diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 3f9f453..9586d87 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -5,6 +5,7 @@ "private": true, "devDependencies": { "@vercel/style-guide": "^5.0.0", - "eslint-config-turbo": "^1.10.12" + "eslint-config-turbo": "^1.10.12", + "eslint-plugin-vitest": "^0.5.4" } } diff --git a/packages/eslint-config-custom/react-internal.js b/packages/eslint-config-custom/react-internal.js index 0970534..ae6523a 100644 --- a/packages/eslint-config-custom/react-internal.js +++ b/packages/eslint-config-custom/react-internal.js @@ -17,7 +17,6 @@ module.exports = { '@vercel/style-guide/eslint/browser', '@vercel/style-guide/eslint/typescript', '@vercel/style-guide/eslint/react', - '@vercel/style-guide/eslint/vitest', ].map(require.resolve), parserOptions: { project, diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js index d750d83..5e1f7f2 100644 --- a/packages/ui/.eslintrc.js +++ b/packages/ui/.eslintrc.js @@ -1,3 +1,9 @@ +const vitest = require('eslint-plugin-vitest'); + module.exports = { - extends: ["custom/react-internal"], + extends: ['custom/react-internal'], + plugins: ['vitest'], + rules: { + ...vitest.configs.recommended.rules, + }, }; diff --git a/turbo.json b/turbo.json index 10cf2d9..5355270 100644 --- a/turbo.json +++ b/turbo.json @@ -6,7 +6,9 @@ "dependsOn": ["^build"], "outputs": [".next/**", "!.next/cache/**", "dist/**"] }, - "lint": {}, + "lint": { + "cache": false + }, "dev": { "cache": false, "persistent": true diff --git a/yarn.lock b/yarn.lock index 96dd726..a9d2dac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5487,6 +5487,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/scope-manager@npm:7.18.0" + dependencies: + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" + checksum: 10c0/038cd58c2271de146b3a594afe2c99290034033326d57ff1f902976022c8b0138ffd3cb893ae439ae41003b5e4bcc00cabf6b244ce40e8668f9412cc96d97b8e + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/type-utils@npm:6.21.0" @@ -5518,6 +5528,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/types@npm:7.18.0" + checksum: 10c0/eb7371ac55ca77db8e59ba0310b41a74523f17e06f485a0ef819491bc3dd8909bb930120ff7d30aaf54e888167e0005aa1337011f3663dc90fb19203ce478054 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" @@ -5555,6 +5572,25 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.18.0" + dependencies: + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/visitor-keys": "npm:7.18.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/0c7f109a2e460ec8a1524339479cf78ff17814d23c83aa5112c77fb345e87b3642616291908dcddea1e671da63686403dfb712e4a4435104f92abdfddf9aba81 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/utils@npm:6.21.0" @@ -5590,6 +5626,20 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^7.7.1": + version: 7.18.0 + resolution: "@typescript-eslint/utils@npm:7.18.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@typescript-eslint/scope-manager": "npm:7.18.0" + "@typescript-eslint/types": "npm:7.18.0" + "@typescript-eslint/typescript-estree": "npm:7.18.0" + peerDependencies: + eslint: ^8.56.0 + checksum: 10c0/a25a6d50eb45c514469a01ff01f215115a4725fb18401055a847ddf20d1b681409c4027f349033a95c4ff7138d28c3b0a70253dfe8262eb732df4b87c547bd1e + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" @@ -5610,6 +5660,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:7.18.0": + version: 7.18.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.18.0" + dependencies: + "@typescript-eslint/types": "npm:7.18.0" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10c0/538b645f8ff1d9debf264865c69a317074eaff0255e63d7407046176b0f6a6beba34a6c51d511f12444bae12a98c69891eb6f403c9f54c6c2e2849d1c1cb73c0 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -8808,6 +8868,7 @@ __metadata: dependencies: "@vercel/style-guide": "npm:^5.0.0" eslint-config-turbo: "npm:^1.10.12" + eslint-plugin-vitest: "npm:^0.5.4" languageName: unknown linkType: soft @@ -9096,6 +9157,23 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-vitest@npm:^0.5.4": + version: 0.5.4 + resolution: "eslint-plugin-vitest@npm:0.5.4" + dependencies: + "@typescript-eslint/utils": "npm:^7.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vitest: "*" + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + vitest: + optional: true + checksum: 10c0/b55cca2fee39e46fd9504f8fc6dbf790c4a63f2f4b77c013857954f9d6b5f5d3c4370314cba03367f34f40783d49a81763c0c16fd4e9689b28164569f2354591 + languageName: node + linkType: hard + "eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -15440,7 +15518,7 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.0.1": +"ts-api-utils@npm:^1.0.1, ts-api-utils@npm:^1.3.0": version: 1.3.0 resolution: "ts-api-utils@npm:1.3.0" peerDependencies: From f6ba90b701686fc5dc6b311b499645f5e5d485d3 Mon Sep 17 00:00:00 2001 From: jungwoo3490 Date: Tue, 10 Sep 2024 00:37:27 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix(ui):=20lint=20warning=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/Dialog/types.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ui/Dialog/types.ts b/packages/ui/Dialog/types.ts index fea9860..fab62d1 100644 --- a/packages/ui/Dialog/types.ts +++ b/packages/ui/Dialog/types.ts @@ -1,7 +1,6 @@ import type { ReactNode } from 'react'; import type React from 'react'; - -import { CheckBoxProps } from 'Control/CheckBox'; +import type { CheckBoxProps } from 'Control/CheckBox'; export interface ChildrenProp { From 97a3b4e2961bf89e45eebacba59f51df1220c04c Mon Sep 17 00:00:00 2001 From: jungwoo3490 Date: Tue, 10 Sep 2024 01:11:26 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20test=20=EB=AA=85=EB=A0=B9=EC=96=B4?= =?UTF-8?q?=20cache=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- turbo.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index 5355270..7087aaa 100644 --- a/turbo.json +++ b/turbo.json @@ -13,6 +13,8 @@ "cache": false, "persistent": true }, - "test": {} + "test": { + "cache": false + } } }