From f3566a4be12484a832481e087821c84d4ece8f46 Mon Sep 17 00:00:00 2001 From: abtestingalpha Date: Tue, 29 Oct 2024 11:14:05 -0400 Subject: [PATCH] --if-present flag to run spellcheck only if in package.json script --- .github/workflows/packages.yml | 2 +- docs/bridge/package.json | 3 ++- packages/contracts-core/package.json | 3 +-- packages/contracts-rfq/package.json | 1 - packages/coverage-aggregator/package.json | 1 - packages/explorer-ui/package.json | 3 ++- packages/rest-api/package.json | 1 - packages/rfq-indexer/api/package.json | 1 - packages/rfq-indexer/indexer/package.json | 1 - packages/rfq-loadtest/package.json | 1 - packages/sdk-router/package.json | 3 ++- packages/solidity-devops/package.json | 1 - packages/synapse-constants/package.json | 1 - packages/synapse-interface/package.json | 3 ++- packages/widget/package.json | 1 - 15 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index e8949ef10f..61f5b42629 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -42,7 +42,7 @@ jobs: run: npx lerna exec npm run ci:lint --parallel - name: Run spellcheck # Run spellcheck of all packages - run: npx lerna exec npm run ci:spellcheck --parallel + run: npx lerna exec npm run ci:spellcheck --parallel -- --if-present test: runs-on: ubuntu-latest diff --git a/docs/bridge/package.json b/docs/bridge/package.json index d3939239b7..427ebda0f2 100644 --- a/docs/bridge/package.json +++ b/docs/bridge/package.json @@ -15,7 +15,8 @@ "test:coverage": " ", "build:go": " ", "build:slither": " ", - "ci:spellcheck": "cspell \"**/*.{md,mdx}\" --show-suggestions", + "spellcheck": "cspell \"**/*.{md,mdx}\" --show-suggestions", + "ci:spellcheck": "cspell \"**/*.{md,mdx}\" --no-progress --show-suggestions", "write-heading-ids": "docusaurus write-heading-ids", "typecheck": "tsc" }, diff --git a/packages/contracts-core/package.json b/packages/contracts-core/package.json index 1072c5a3d8..0148f28253 100644 --- a/packages/contracts-core/package.json +++ b/packages/contracts-core/package.json @@ -14,8 +14,7 @@ "lint:contracts:fix": "forge fmt && solhint --fix -c .solhint.json '{contracts,script,test}/**/*.sol'", "lint:fix": "yarn lint:contracts:fix", "lint": "forge fmt", - "ci:lint": "forge fmt --check && solhint -c .solhint.json '{contracts,script,test}/**/*.sol'", - "ci:spellcheck": " " + "ci:lint": "forge fmt --check && solhint -c .solhint.json '{contracts,script,test}/**/*.sol'" }, "files": [ "contracts/**/*.sol", diff --git a/packages/contracts-rfq/package.json b/packages/contracts-rfq/package.json index 16d0e7c750..fad536219e 100644 --- a/packages/contracts-rfq/package.json +++ b/packages/contracts-rfq/package.json @@ -26,7 +26,6 @@ "lint": "forge fmt && npm run solhint", "lint:check": "forge fmt --check && npm run solhint:check", "ci:lint": "npm run lint:check", - "ci:spellcheck": " ", "build:go": "./flatten.sh contracts/*.sol test/*.sol", "solhint": "solhint '{contracts,script,test}/**/*.sol' --fix --noPrompt --max-warnings 3", "solhint:check": "solhint '{contracts,script,test}/**/*.sol' --max-warnings 3" diff --git a/packages/coverage-aggregator/package.json b/packages/coverage-aggregator/package.json index 0fb94b7f5b..25be8ab451 100644 --- a/packages/coverage-aggregator/package.json +++ b/packages/coverage-aggregator/package.json @@ -21,7 +21,6 @@ "lint": "npm run lint:fix && npm run lint:check", "lint:check": "eslint . --max-warnings=0 --ext ts --ext tsx --ext js --ext jsx", "ci:lint": "npm run lint:check", - "ci:spellcheck": " ", "build:go": " ", "build": " ", "build:slither": " ", diff --git a/packages/explorer-ui/package.json b/packages/explorer-ui/package.json index 7e6d09e273..0df04ad566 100644 --- a/packages/explorer-ui/package.json +++ b/packages/explorer-ui/package.json @@ -56,7 +56,8 @@ "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook", "lint:fix": "npm run lint -- --fix", - "ci:spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --show-suggestions", + "spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --show-suggestions", + "ci:spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --no-progress --show-suggestions", "lint:check": "eslint . --max-warnings=0" }, "browserslist": { diff --git a/packages/rest-api/package.json b/packages/rest-api/package.json index c3f4454456..dc542ec764 100644 --- a/packages/rest-api/package.json +++ b/packages/rest-api/package.json @@ -14,7 +14,6 @@ "lint:fix": "eslint src/**/*.ts --fix", "lint:check": "eslint . --max-warnings=0", "ci:lint": "npm run lint:check", - "ci:spellcheck": " ", "test": "jest", "test:coverage": "jest --collect-coverage" }, diff --git a/packages/rfq-indexer/api/package.json b/packages/rfq-indexer/api/package.json index 87d3eca1f4..9b2aa991a4 100644 --- a/packages/rfq-indexer/api/package.json +++ b/packages/rfq-indexer/api/package.json @@ -13,7 +13,6 @@ "dev": "dotenv -e .env -- tsx watch src/app.ts", "lint:check": " ", "ci:lint": " ", - "ci:spellcheck": " ", "build:go": " ", "build": " ", "build:slither": " ", diff --git a/packages/rfq-indexer/indexer/package.json b/packages/rfq-indexer/indexer/package.json index 3b176b35a3..9bb808e1d3 100644 --- a/packages/rfq-indexer/indexer/package.json +++ b/packages/rfq-indexer/indexer/package.json @@ -11,7 +11,6 @@ "codegen": "ponder codegen", "lint": "eslint .", "ci:lint": "eslint .", - "ci:spellcheck": " ", "typecheck": "tsc", "test:coverage": "echo 'No tests defined.'", "build:go": " ", diff --git a/packages/rfq-loadtest/package.json b/packages/rfq-loadtest/package.json index 9da6cbdd5d..763a876e7a 100644 --- a/packages/rfq-loadtest/package.json +++ b/packages/rfq-loadtest/package.json @@ -8,7 +8,6 @@ "build": "cp src/pyRepeater.py dist/ && tsc", "lint": "eslint .", "ci:lint": "eslint .", - "ci:spellcheck": " ", "typecheck": "tsc", "test:coverage": "echo 'No tests defined.'", "build:go": " ", diff --git a/packages/sdk-router/package.json b/packages/sdk-router/package.json index 4d259c1c90..89df959673 100644 --- a/packages/sdk-router/package.json +++ b/packages/sdk-router/package.json @@ -28,7 +28,8 @@ "prepare": "tsdx build", "preinstall": "command -v tsdx >/dev/null 2>&1 && tsdx build || echo 'tsdx not found'", "size": "size-limit", - "ci:spellcheck": "cspell \"README.md\" --show-suggestions", + "spellcheck": "cspell \"README.md\" --show-suggestions", + "ci:spellcheck": "cspell \"README.md\" --no-progress --show-suggestions", "analyze": "size-limit --why", "build:go": " ", "build:slither": " " diff --git a/packages/solidity-devops/package.json b/packages/solidity-devops/package.json index 49466b5c43..003dbdf15f 100644 --- a/packages/solidity-devops/package.json +++ b/packages/solidity-devops/package.json @@ -23,7 +23,6 @@ "build:go": " ", "build:slither": " ", "ci:lint": "npm run lint:check", - "ci:spellcheck": " ", "lint": "forge fmt && eslint . --fix --ext js && solhint --fix -c .solhint.json '{src,script,test}/**/*.sol'", "lint:check": "forge fmt --check && eslint . --max-warnings=0 --ext js && solhint -c .solhint.json '{src,script,test}/**/*.sol'", "test:coverage": "echo 'TODO: Add test coverage'" diff --git a/packages/synapse-constants/package.json b/packages/synapse-constants/package.json index c2f6561aef..cd5d15c31c 100644 --- a/packages/synapse-constants/package.json +++ b/packages/synapse-constants/package.json @@ -20,7 +20,6 @@ "scripts": { "test:coverage": "echo 'No tests defined.'", "ci:lint": " ", - "ci:spellcheck": " ", "build:go": " ", "build:slither": " ", "lint": " ", diff --git a/packages/synapse-interface/package.json b/packages/synapse-interface/package.json index 1e9ab57294..3e700f6719 100644 --- a/packages/synapse-interface/package.json +++ b/packages/synapse-interface/package.json @@ -22,7 +22,8 @@ "build:slither": " ", "graphql:generate": "graphql-codegen --config codegen.ts", "maps:generate": "node scripts/generateMaps.js", - "ci:spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --show-suggestions", + "spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --show-suggestions", + "ci:spellcheck": "cspell \"**/*.{tsx,jsx,md,mdx}\" --no-progress --show-suggestions", "test": "echo 'No jest tests defined.'" }, "dependencies": { diff --git a/packages/widget/package.json b/packages/widget/package.json index f1ef8f669e..558c85ca6f 100644 --- a/packages/widget/package.json +++ b/packages/widget/package.json @@ -24,7 +24,6 @@ "test:coverage": "echo 'No tests defined.'", "lint:check": "eslint . --max-warnings=0", "ci:lint": "npm run lint:check", - "ci:spellcheck": " ", "build:go": " ", "build:slither": " ", "prepare": "rollup -c --bundleConfigAsCjs"