Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add examples for spellchecker and spell-checker ignores #7000

Merged
merged 3 commits into from
Mar 9, 2025
Merged
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
10 changes: 9 additions & 1 deletion docs/configuration/document-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nav_order: 11
It is possible to add spell check settings into your source code.
This is to help with file specific issues that may not be applicable to the entire project.

All settings are prefixed with `cSpell:` or `spell-checker:`.
All settings are prefixed with `cSpell:`, `spell-checker:`, or `spellchecker:`.

- `disable` -- turn off the spell checker for a section of code.
- `enable` -- turn the spell checker back on after it has been turned off.
Expand Down Expand Up @@ -83,10 +83,18 @@ const str = 'goedemorgen'; // <- will NOT be flagged as an error.

_Ignore_ allows you the specify a list of words you want to ignore within the document.

- `/* cSpell: ignore */`
- `/* spell-checker: ignore */`
- `/* spellchecker: ignore */`

```javascript
// cSpell:ignore zaallano, wooorrdd
// cSpell:ignore zzooommmmmmmm
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];

// spell-checker: ignore ieeees
/* spellchecker: ignore beees,treeees */
const moreWords = ['ieeees', 'beees', 'treeees'];
```

**Note:** words defined with `ignore` will be ignored for the entire file.
Expand Down
10 changes: 9 additions & 1 deletion website/docs/Configuration/document-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nav_order: 11
It is possible to add spell check settings into your source code.
This is to help with file specific issues that may not be applicable to the entire project.

All settings are prefixed with `cSpell:` or `spell-checker:`.
All settings are prefixed with `cSpell:`, `spell-checker:`, or `spellchecker:`.

- `disable` -- turn off the spell checker for a section of code.
- `enable` -- turn the spell checker back on after it has been turned off.
Expand Down Expand Up @@ -83,10 +83,18 @@ const str = 'goedemorgen'; // <- will NOT be flagged as an error.

_Ignore_ allows you the specify a list of words you want to ignore within the document.

- `/* cSpell: ignore */`
- `/* spell-checker: ignore */`
- `/* spellchecker: ignore */`

```javascript
// cSpell:ignore zaallano, wooorrdd
// cSpell:ignore zzooommmmmmmm
const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];

// spell-checker: ignore ieeees
/* spellchecker: ignore beees,treeees */
const moreWords = ['ieeees', 'beees', 'treeees'];
```

**Note:** words defined with `ignore` will be ignored for the entire file.
Expand Down
Loading