diff --git a/docs-spelling-check/.cursorrules b/docs-spelling-check/.cursorrules new file mode 100644 index 0000000..6907bd5 --- /dev/null +++ b/docs-spelling-check/.cursorrules @@ -0,0 +1,29 @@ +# Cursor Rules for docs-spelling-check + +## File Access Restrictions + +**IMPORTANT**: Only modify files within these directories: +- `styles/config/` (and all subdirectories) +- `styles/Consensys/` (and all subdirectories) + +**DO NOT** modify, edit, or create files in: +- `styles/Microsoft/` (external package - changes will be lost on sync) +- `styles/proselint/` (external package - changes will be lost on sync) +- `styles/write-good/` (external package - changes will be lost on sync) +- Any other directories outside of `styles/config/` and `styles/Consensys/` + +## Workflow Guidelines + +1. **Read-only access** to external packages: You may read files in `styles/Microsoft/`, `styles/proselint/`, and `styles/write-good/` for reference, but never modify them. + +2. **Allowed modifications**: + - Files in `styles/config/` (including `ignore.yml`, vocabulary files, etc.) + - Files in `styles/Consensys/` (all YAML style files) + +3. **Before making changes**: Always verify the file path is within the allowed directories. + +4. **If asked to modify restricted files**: Politely decline and explain that those are external packages that will be overwritten on sync. + +## Context + +This repository uses Vale for linting. The `styles/config/` directory contains project-specific configuration and vocabulary files. The `styles/Consensys/` directory contains custom style rules. The other style directories (`Microsoft/`, `proselint/`, `write-good/`) are external packages that are synced and should not be modified. diff --git a/docs-spelling-check/action.yml b/docs-spelling-check/action.yml index 438fbd6..b18a3b0 100644 --- a/docs-spelling-check/action.yml +++ b/docs-spelling-check/action.yml @@ -5,9 +5,9 @@ description: 'Composite action to test spelling' inputs: FILEPATHS: - description: 'Filepaths to look at, specified as a comma separated string ie "docs,blog,etc"' + description: 'Filepaths to look at, specified as a comma separated string with glob patterns ie "docs/**/*.md,blog/**/*.mdx,etc"' required: false - default: 'docs' + default: 'docs/**/*.md,docs/**/*.mdx' runs: using: "composite" @@ -18,19 +18,24 @@ runs: repository: Consensys/github-actions path: .github-actions + # 2f7c5bfce28377bc069a65ba478de0a74aa0ca32 = v46.0.1 as at 18032025 + - uses: tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 + id: changed-files + with: + files: ${{ inputs.FILEPATHS }} + separator: ',' + output_separator: '\n' + - uses: actions/setup-python@v6 with: python-version: '3.12' # 38bf078c328061f59879b347ca344a718a736018 = v2 as at 24092024 - name: Vale + if: ${{ steps.changed-files.outputs.all_changed_files != '' }} uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 with: - files: ${{ inputs.FILEPATHS }} - separator: "," - vale_flags: "--config .github-actions/docs-spelling-check/.vale.ini --glob={*.md,*.mdx}" + files: ${{ steps.changed-files.outputs.all_changed_files }} + vale_flags: "--config .github-actions/docs-spelling-check/.vale.ini" # fail_on_error: true reporter: github-pr-check - - - \ No newline at end of file diff --git a/docs-spelling-check/styles/Consensys/CaseSensitive-Substitution.yml b/docs-spelling-check/styles/Consensys/CaseSensitive-Substitution.yml index 9185b39..05c98da 100644 --- a/docs-spelling-check/styles/Consensys/CaseSensitive-Substitution.yml +++ b/docs-spelling-check/styles/Consensys/CaseSensitive-Substitution.yml @@ -20,16 +20,33 @@ swap: 'On-chain': 'Onchain' 'on chain': 'onchain' 'On chain': 'Onchain' + # tested but this apparently failed to be handled with [Oo]ffchain in accept + 'off-chain': 'offchain' + 'Off-chain': 'Offchain' + 'off chain': 'offchain' + 'Off chain': 'Offchain' # this may be handled just by putting zkEVM into accept {need to test} 'ZK EVM': '"zkEVM"' 'ZKEVM': '"zkEVM"' 'ZK-EVM': '"zkEVM"' 'zk-EVM': '"zkEVM"' 'zk EVM': '"zkEVM"' - # MetaMask Embedded Wallets - enforce proper capitalization - 'metamask embedded wallets': '"MetaMask Embedded Wallets"' - 'MetaMask embedded wallets': '"MetaMask Embedded Wallets"' - 'MetaMask Embedded wallets': '"MetaMask Embedded Wallets"' - 'metamask Embedded Wallets': '"MetaMask Embedded Wallets"' + # MetaMask - enforce proper capitalization + "metamask": "MetaMask" + "Metamask": "MetaMask" + # Embedded Wallets - enforce proper capitalization + "embedded wallets": "Embedded Wallets" + "embedded Wallets": "Embedded Wallets" + "Embedded wallets": "Embedded Wallets" + # Mastercard - enforce proper capitalization + 'mastercard': '"Mastercard"' + # WalletConnect - enforce proper capitalization + 'walletconnect': '"WalletConnect"' + 'Walletconnect': '"WalletConnect"' + # Shamir's - enforce proper capitalization + shamir: "Shamir's" + "shamir's": "Shamir's" + # Polkadot - enforce proper capitalization + "polkadot": "Polkadot" diff --git a/docs-spelling-check/styles/config/ignore/Consensys-common/project-words.txt b/docs-spelling-check/styles/config/ignore/Consensys-common/project-words.txt index 093dbf1..fd1a329 100644 --- a/docs-spelling-check/styles/config/ignore/Consensys-common/project-words.txt +++ b/docs-spelling-check/styles/config/ignore/Consensys-common/project-words.txt @@ -395,7 +395,6 @@ ethclient ethdo etherbase ethereumj -ethers etherspot ethersproject ethersv @@ -958,7 +957,7 @@ plushies pnpm poap podfile -polkadot +Polkadot pollable polyfill polyfills @@ -1147,7 +1146,7 @@ sess setaf setext sgaua -shamir +Shamir's shannessy sharded shasum @@ -1188,6 +1187,7 @@ socialscan socure solana solana's +@solana/web3.js somer soulbound sourcify @@ -1408,7 +1408,6 @@ vitidiary vjeux vwap vyper -wagmi wagmi's waitlist waivable diff --git a/docs-spelling-check/styles/config/vocabularies/Consensys-common/accept.txt b/docs-spelling-check/styles/config/vocabularies/Consensys-common/accept.txt index d614ac3..1d54e14 100644 --- a/docs-spelling-check/styles/config/vocabularies/Consensys-common/accept.txt +++ b/docs-spelling-check/styles/config/vocabularies/Consensys-common/accept.txt @@ -16,6 +16,8 @@ Axelar Azure Key Vault BerkeleyDB Bintray +[bB]iometrics +[bB]ivariate [bB]undler[s]? Cakeshop [cC]alldata @@ -64,6 +66,7 @@ ESLint EthSigner Ethereum ^[Ee]therscan$ +[eE]thers Etherspot ^eth_sendbundle$ Figma @@ -247,6 +250,8 @@ USB Armory Mk II Vercel Vertx vCPU[s]? +[vV]ue +[wW]agmi [wW]eb3 Web3Signer [wW]ithdrawable