From 26d9a9c7d99ee0777cef50b76afe5aa8cfcd501c Mon Sep 17 00:00:00 2001 From: jpveooys <66470099+jpveooys@users.noreply.github.com> Date: Thu, 17 Mar 2022 15:09:25 +0000 Subject: [PATCH] chore(Deps): Hoist lint-staged dependency and remove parallel running `lint-staged` should be run once from the root directory, and therefore that's where it should be installed. See https://github.com/okonet/lint-staged#how-to-use-lint-staged-in-a-multi-package-monorepo for more details. Additionally, running it in parallel causes Git lock conflicts: https://github.com/okonet/lint-staged/issues/1105#issuecomment-1039140085. --- package.json | 2 +- packages/react-component-library/package.json | 2 -- yarn.lock | 14 ++++++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c6297f0802..9c96add630 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "eslint-plugin-prettier": "^4.0.0", "husky": "^7.0.1", "lerna": "^4.0.0", + "lint-staged": "^12.3.6", "prettier": "^2.0.5" }, "resolutions": { @@ -48,7 +49,6 @@ "scripts": { "build": "lerna run --stream --concurrency 1 build", "lint": "lerna run --parallel lint", - "lint-staged": "lerna run --parallel lint-staged", "test": "lerna run --parallel test", "storybook:static": "lerna run --parallel storybook:static", "lerna:prerelease": "yarn lerna:run-version --conventional-prerelease=* --no-changelog -m \"chore(Prerelease): %v [skip ci]\"", diff --git a/packages/react-component-library/package.json b/packages/react-component-library/package.json index 0012dc1e95..60344d8405 100644 --- a/packages/react-component-library/package.json +++ b/packages/react-component-library/package.json @@ -34,7 +34,6 @@ "build:ts:dev": "webpack --mode production --config=webpack/dev.js", "chromatic": "chromatic --build-script-name storybook:static", "dev": "concurrently \"webpack --watch --config=webpack/dev.js\" \"yarn types --watch\"", - "lint-staged": "lint-staged", "lint": "eslint src cypress --ext .js --ext .jsx --ext .ts --ext .tsx", "prepare": "yarn build", "storybook": "BABEL_ENV=es RNDS_LOG_LEVEL=debug start-storybook -p 6006", @@ -124,7 +123,6 @@ "jest-junit": "^13.0.0", "jest-sonar-reporter": "^2.0.0", "jest-styled-components": "^7.0.3", - "lint-staged": "^12.0.2", "local-cypress": "^1.2.1", "npm-run-all": "^4.1.5", "prettier": "^2.0.5", diff --git a/yarn.lock b/yarn.lock index e8e6969bb0..cd5a96fb59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11942,10 +11942,10 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -lint-staged@^12.0.2: - version "12.3.5" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.5.tgz#8048ce048c3cac12f57200a06344a54dc91c8fa9" - integrity sha512-oOH36RUs1It7b9U/C7Nl/a0sLfoIBcMB8ramiB3nuJ6brBqzsWiUAFSR5DQ3yyP/OR7XKMpijtgKl2DV1lQ3lA== +lint-staged@^12.3.6: + version "12.3.6" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.6.tgz#7b999ebe041c07f241537a17c49969027b4d26f0" + integrity sha512-tVNyl/HsAnplKh4oaoRNzyZLm0PE/6VaBUXvd/gA9zhYCC/+ivZwiwpoT6jOxcLzuIOjP19wW+mfOi7/Bw4c1A== dependencies: cli-truncate "^3.1.0" colorette "^2.0.16" @@ -11957,6 +11957,7 @@ lint-staged@^12.0.2: micromatch "^4.0.4" normalize-path "^3.0.0" object-inspect "^1.12.0" + pidtree "^0.5.0" string-argv "^0.3.1" supports-color "^9.2.1" yaml "^1.10.2" @@ -13904,6 +13905,11 @@ pidtree@^0.3.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== +pidtree@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.5.0.tgz#ad5fbc1de78b8a5f99d6fbdd4f6e4eee21d1aca1" + integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA== + pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"