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" + ] } }