Installation
Project
Node
CSpell requires Node.js version >=18.0.
Check the node version
node -vEnsure that you are meeting the requirements.
The below commands install CSpell.
- npm
- Yarn
- pnpm
- Bun
npm install -g cspell@latest
yarn global add cspell@latest
pnpm add -g cspell@latest
bun add --global cspell@latest
Usage
-
cspell . -
npx cspell . -
yarn cspell .
Resources
CI
Github
The Github action will automatically configure a Github reporter which will result in issues being created as annotations on the source code making them visible in pr's etc.
Usage
Example spellcheck.yaml
name: 'Check spelling'
on: # rebuild any PRs and main branch changes
pull_request:
push:
jobs:
spellcheck: # run the action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: streetsidesoftware/cspell-action@v8