Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs-spelling-check/.cursorrules
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 13 additions & 8 deletions docs-spelling-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed separator may break vale-action file parsing

Medium Severity

The separator parameter was removed from the vale-action configuration, but the input format has changed from comma-separated paths to newline-separated file paths (via output_separator: '\n' from changed-files). The old configuration explicitly set separator: "," to tell vale-action how to parse multiple files. Without this parameter, vale-action may not correctly parse the newline-separated all_changed_files output, potentially causing the linter to fail or process files incorrectly.

Fix in Cursor Fix in Web

vale_flags: "--config .github-actions/docs-spelling-check/.vale.ini"
# fail_on_error: true
reporter: github-pr-check



Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing substitution rule for capitalized "Shamir" without apostrophe

Low Severity

The substitution rules only cover shamir and shamir's (lowercase forms), but with ignorecase: false, these won't match Shamir (capital S, no apostrophe). The project-words.txt only ignores Shamir's. If someone writes "Shamir" as a proper noun (e.g., referencing Adi Shamir), it would be flagged as a spelling error since there's no substitution rule like Shamir: "Shamir's" to handle this capitalized form.

Fix in Cursor Fix in Web

# Polkadot - enforce proper capitalization
"polkadot": "Polkadot"


Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ ethclient
ethdo
etherbase
ethereumj
ethers
etherspot
ethersproject
ethersv
Expand Down Expand Up @@ -958,7 +957,7 @@ plushies
pnpm
poap
podfile
polkadot
Polkadot
pollable
polyfill
polyfills
Expand Down Expand Up @@ -1147,7 +1146,7 @@ sess
setaf
setext
sgaua
shamir
Shamir's
shannessy
sharded
shasum
Expand Down Expand Up @@ -1188,6 +1187,7 @@ socialscan
socure
solana
solana's
@solana/web3.js
somer
soulbound
sourcify
Expand Down Expand Up @@ -1408,7 +1408,6 @@ vitidiary
vjeux
vwap
vyper
wagmi
wagmi's
waitlist
waivable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Axelar
Azure Key Vault
BerkeleyDB
Bintray
[bB]iometrics
[bB]ivariate
[bB]undler[s]?
Cakeshop
[cC]alldata
Expand Down Expand Up @@ -64,6 +66,7 @@ ESLint
EthSigner
Ethereum
^[Ee]therscan$
[eE]thers
Etherspot
^eth_sendbundle$
Figma
Expand Down Expand Up @@ -247,6 +250,8 @@ USB Armory Mk II
Vercel
Vertx
vCPU[s]?
[vV]ue
[wW]agmi
[wW]eb3
Web3Signer
[wW]ithdrawable
Expand Down