Skip to content

Commit

Permalink
--if-present flag to run spellcheck only if in package.json script
Browse files Browse the repository at this point in the history
  • Loading branch information
abtestingalpha committed Oct 29, 2024
1 parent 55bedbb commit f3566a4
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/contracts-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion packages/contracts-rfq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion packages/coverage-aggregator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": " ",
Expand Down
3 changes: 2 additions & 1 deletion packages/explorer-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion packages/rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
1 change: 0 additions & 1 deletion packages/rfq-indexer/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"dev": "dotenv -e .env -- tsx watch src/app.ts",
"lint:check": " ",
"ci:lint": " ",
"ci:spellcheck": " ",
"build:go": " ",
"build": " ",
"build:slither": " ",
Expand Down
1 change: 0 additions & 1 deletion packages/rfq-indexer/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"codegen": "ponder codegen",
"lint": "eslint .",
"ci:lint": "eslint .",
"ci:spellcheck": " ",
"typecheck": "tsc",
"test:coverage": "echo 'No tests defined.'",
"build:go": " ",
Expand Down
1 change: 0 additions & 1 deletion packages/rfq-loadtest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": " ",
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": " "
Expand Down
1 change: 0 additions & 1 deletion packages/solidity-devops/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down
1 change: 0 additions & 1 deletion packages/synapse-constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"scripts": {
"test:coverage": "echo 'No tests defined.'",
"ci:lint": " ",
"ci:spellcheck": " ",
"build:go": " ",
"build:slither": " ",
"lint": " ",
Expand Down
3 changes: 2 additions & 1 deletion packages/synapse-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion packages/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f3566a4

Please sign in to comment.