From 6e025cbafff1019e108b3b0c92c18f68177a8aee Mon Sep 17 00:00:00 2001 From: choisohyun Date: Wed, 11 Sep 2024 22:58:54 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20view,=20vscode=EC=97=90=EB=8F=84=20hus?= =?UTF-8?q?ky,=20lint-staged=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4 ++++ packages/view/package.json | 13 ++++++++++++- packages/vscode/package.json | 13 ++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a26fe53b..3ffa5bb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30397,6 +30397,8 @@ "eslint-plugin-react-hooks": "^4.6.0", "fork-ts-checker-webpack-plugin": "^7.2.13", "html-webpack-plugin": "^5.5.0", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", "prettier": "^3.0.1", "sass": "^1.77.4", "sass-loader": "^13.0.2", @@ -30457,6 +30459,8 @@ "eslint-plugin-unused-imports": "^3.0.0", "formdata-polyfill": "^4.0.10", "glob": "^8.0.1", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", "mocha": "^9.2.2", "prettier": "^3.0.1", "ts-loader": "^9.2.8", diff --git a/packages/view/package.json b/packages/view/package.json index 7665c32b..bad41cbb 100644 --- a/packages/view/package.json +++ b/packages/view/package.json @@ -13,7 +13,8 @@ "test": "jest", "test:e2e": "playwright test", "lint": "eslint src --ext ts", - "lint:fix": "eslint src --ext ts --fix" + "lint:fix": "eslint src --ext ts --fix", + "lint-staged": "lint-staged" }, "eslintConfig": { "extends": [ @@ -77,6 +78,8 @@ "eslint-plugin-react-hooks": "^4.6.0", "fork-ts-checker-webpack-plugin": "^7.2.13", "html-webpack-plugin": "^5.5.0", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", "prettier": "^3.0.1", "sass": "^1.77.4", "sass-loader": "^13.0.2", @@ -115,5 +118,13 @@ "ts-jest": "^29.1.1", "tsyringe": "^4.7.0", "zustand": "^4.5.5" + }, + "lint-staged": { + "packages/**/src/**/*.{ts,tsx}": [ + "eslint" + ], + "**/*.{ts,tsx,json,yaml,md}": [ + "prettier --check" + ] } } diff --git a/packages/vscode/package.json b/packages/vscode/package.json index 4f383b53..34159a90 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -81,7 +81,8 @@ "pretest": "npm run compile-tests && npm run compile && npm run lint", "lint": "eslint src --ext ts", "lint:fix": "eslint src --ext ts --fix", - "test": "node ./out/test/runTest.js" + "test": "node ./out/test/runTest.js", + "lint-staged": "lint-staged" }, "dependencies": { "@githru-vscode-ext/analysis-engine": "^0.7.1", @@ -107,11 +108,21 @@ "eslint-plugin-unused-imports": "^3.0.0", "formdata-polyfill": "^4.0.10", "glob": "^8.0.1", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", "mocha": "^9.2.2", "prettier": "^3.0.1", "ts-loader": "^9.2.8", "typescript": "^4.6.4", "webpack": "^5.70.0", "webpack-cli": "^4.9.2" + }, + "lint-staged": { + "packages/**/src/**/*.{ts,tsx}": [ + "eslint" + ], + "**/*.{ts,tsx,json,yaml,md}": [ + "prettier --check" + ] } }