diff --git a/integration-tests/.lintstagedrc.yml b/integration-tests/.lintstagedrc.yml new file mode 100644 index 000000000000..4552e46e5568 --- /dev/null +++ b/integration-tests/.lintstagedrc.yml @@ -0,0 +1,3 @@ +"*.{ts,js}": + - eslint + diff --git a/integration-tests/package.json b/integration-tests/package.json index 94ba78c8ad91..350a6d8cc0b2 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -13,7 +13,8 @@ "test:integration": "hardhat --network optimism test", "test:integration:live": "NO_NETWORK=true IS_LIVE_NETWORK=true hardhat --network optimism test", "test:sync": "hardhat --network optimism test sync-tests/*.spec.ts --no-compile", - "clean": "rimraf cache artifacts" + "clean": "rimraf cache artifacts", + "pre-commit": "lint-staged" }, "devDependencies": { "@eth-optimism/contracts": "^0.4.14", @@ -52,6 +53,7 @@ "mocha": "^8.4.0", "rimraf": "^3.0.2", "shelljs": "^0.8.4", - "typescript": "^4.3.5" + "typescript": "^4.3.5", + "lint-staged": "11.0.0" } } diff --git a/package.json b/package.json index 01c434728e4a..6ff8001b68ed 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "eslint-plugin-unicorn": "^32.0.1", "husky": "^6.0.0", "lerna": "^4.0.0", + "lint-staged": "11.0.0", "patch-package": "^6.4.7", "prettier": "^2.3.1", "prettier-plugin-solidity": "^1.0.0-beta.18", diff --git a/packages/common-ts/package.json b/packages/common-ts/package.json index b11c945ad0df..cbaa1d875b8d 100644 --- a/packages/common-ts/package.json +++ b/packages/common-ts/package.json @@ -42,7 +42,8 @@ "prettier": "^2.3.1", "supertest": "^6.1.4", "ts-mocha": "^8.0.0", - "typescript": "^4.3.5" + "typescript": "^4.3.5", + "lint-staged": "11.0.0" }, "dependencies": { "@sentry/node": "^6.3.1", diff --git a/packages/regenesis-surgery/package.json b/packages/regenesis-surgery/package.json index 12006c5ecadf..f29237904e50 100644 --- a/packages/regenesis-surgery/package.json +++ b/packages/regenesis-surgery/package.json @@ -30,6 +30,7 @@ "mocha": "^9.1.2", "node-fetch": "2.6.5", "solc": "0.8.7-fixed", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "lint-staged": "11.0.0" } } diff --git a/packages/replica-healthcheck/package.json b/packages/replica-healthcheck/package.json index b26c9ec4134a..b2ebb114ba8d 100644 --- a/packages/replica-healthcheck/package.json +++ b/packages/replica-healthcheck/package.json @@ -36,6 +36,7 @@ "express": "^4.17.1", "express-prom-bundle": "^6.3.6", "node-cron": "^3.0.0", - "prom-client": "^13.1.0" + "prom-client": "^13.1.0", + "lint-staged": "11.0.0" } }