talira

A Spell Checker for Code!

open sourceMITself-hostablefree

CSpell spell-checks source code and documentation, built to get through large codebases with thousands of files in seconds. It checks words against built-in and add-on dictionaries for dozens of programming and human languages, with project word lists and custom dictionaries in a config file (cspell.json, YAML, JavaScript, TOML or package.json). It runs as a command line tool in CI, as an ESLint plugin, as a Node library, and as the Code Spell Checker extension for Visual Studio Code. Street Side Software maintains it.

Ways to install

Package managers

Problems it solves

  • typos in variable names and comments keep slipping through code review
  • fail the CI build when someone adds a misspelled word to our docs or code
  • spell check identifiers split on camelCase and snake_case, not just prose
  • a normal spell checker flags every function name and technical term in my code
  • keep a shared list of project-specific words so the whole team gets the same results
  • highlight spelling mistakes in my editor while I write code
  • spell check Markdown docs, YAML and source files across a whole monorepo
  • spell check code comments written in British English or another language
  • report misspellings as lint errors alongside our other JavaScript lint rules
  • only spell check the files that changed so the check stays fast
  • a misspelled API field name made it into our public API before anyone noticed

Features

  • built-in and add-on dictionaries for programming and human languages
  • custom word lists and dictionaries
  • config in cspell.json, YAML, JavaScript, TOML or package.json
  • file globs, .gitignore support and exclusions
  • result caching by content or metadata
  • suggestions for misspelled words
  • several reporters for CI output
  • ESLint plugin
  • VS Code extension (Code Spell Checker)
  • Node library (cspell-lib)

Limitations

  • Doesn't give free support for older major versions: 9.x and earlier get paid support only2

Capabilities

Has an APIplan not known
Has a command line toolplan not known

Alternatives

The same job

These do what CSpell does.

  1. typos Source code spell checker

Compare CSpell with the top 3