Skip to content

Commit 33f2372

Browse files
authored
fix: correct file type in code samples (#4489)
1 parent 7f904cc commit 33f2372

File tree

1 file changed

+28
-39
lines changed

1 file changed

+28
-39
lines changed

README.md

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -386,34 +386,25 @@ Note, the settings in `cspell.json` will override the equivalent cSpell settings
386386

387387
#### Example _cspell.json_ file
388388

389-
```javascript
389+
```jsonc
390390
// cSpell Settings
391391
{
392392
// Version of the setting file. Always 0.2
393393
"version": "0.2",
394394
// language - current active spelling language
395395
"language": "en",
396396
// words - list of words to be always considered correct
397-
"words": [
398-
"mkdirp",
399-
"tsmerge",
400-
"githubusercontent",
401-
"streetsidesoftware",
402-
"vsmarketplacebadge",
403-
"visualstudio"
404-
],
397+
"words": ["mkdirp", "tsmerge", "githubusercontent", "streetsidesoftware", "vsmarketplacebadge", "visualstudio"],
405398
// flagWords - list of words to be always considered incorrect
406399
// This is useful for offensive words and common spelling errors.
407400
// For example "hte" should be "the"
408-
"flagWords": [
409-
"hte"
410-
]
401+
"flagWords": ["hte"]
411402
}
412403
```
413404

414405
### VS Code Configuration Settings
415406

416-
```javascript
407+
```jsonc
417408
//-------- Code Spell Checker Configuration --------
418409
// The Language locale to use when spell checking. "en", "en-US" and "en-GB" are currently supported by default.
419410
"cSpell.language": "en",
@@ -519,25 +510,25 @@ Here are some of the default rules:
519510
- `"*"` matches any programming language / file type.
520511
- `"locale"` is used to filter based upon the `"cSpell.language"` setting.
521512

522-
```javascript
513+
```jsonc
523514
{
524-
"cSpell.languageSettings": [
525-
{ "languageId": '*', "locale": 'en', "dictionaries": ['wordsEn'] },
526-
{ "languageId": '*', "locale": 'en-US', "dictionaries": ['wordsEn'] },
527-
{ "languageId": '*', "locale": 'en-GB', "dictionaries": ['wordsEnGb'] },
528-
{ "languageId": '*', "dictionaries": ['companies', 'softwareTerms', 'misc'] },
529-
{ "languageId": "python", "dictionaries": ["python"]},
530-
{ "languageId": "go", "dictionaries": ["go"] },
531-
{ "languageId": "javascript", "dictionaries": ["typescript", "node"] },
532-
{ "languageId": "javascriptreact", "dictionaries": ["typescript", "node"] },
533-
{ "languageId": "typescript", "dictionaries": ["typescript", "node"] },
534-
{ "languageId": "typescriptreact", "dictionaries": ["typescript", "node"] },
535-
{ "languageId": "html", "dictionaries": ["html", "fonts", "typescript", "css"] },
536-
{ "languageId": "php", "dictionaries": ["php", "html", "fonts", "css", "typescript"] },
537-
{ "languageId": "css", "dictionaries": ["fonts", "css"] },
538-
{ "languageId": "less", "dictionaries": ["fonts", "css"] },
539-
{ "languageId": "scss", "dictionaries": ["fonts", "css"] },
540-
];
515+
"cSpell.languageSettings": [
516+
{ "languageId": "*", "locale": "en", "dictionaries": ["wordsEn"] },
517+
{ "languageId": "*", "locale": "en-US", "dictionaries": ["wordsEn"] },
518+
{ "languageId": "*", "locale": "en-GB", "dictionaries": ["wordsEnGb"] },
519+
{ "languageId": "*", "dictionaries": ["companies", "softwareTerms", "misc"] },
520+
{ "languageId": "python", "dictionaries": ["python"] },
521+
{ "languageId": "go", "dictionaries": ["go"] },
522+
{ "languageId": "javascript", "dictionaries": ["typescript", "node"] },
523+
{ "languageId": "javascriptreact", "dictionaries": ["typescript", "node"] },
524+
{ "languageId": "typescript", "dictionaries": ["typescript", "node"] },
525+
{ "languageId": "typescriptreact", "dictionaries": ["typescript", "node"] },
526+
{ "languageId": "html", "dictionaries": ["html", "fonts", "typescript", "css"] },
527+
{ "languageId": "php", "dictionaries": ["php", "html", "fonts", "css", "typescript"] },
528+
{ "languageId": "css", "dictionaries": ["fonts", "css"] },
529+
{ "languageId": "less", "dictionaries": ["fonts", "css"] },
530+
{ "languageId": "scss", "dictionaries": ["fonts", "css"] }
531+
]
541532
}
542533
```
543534

@@ -645,7 +636,7 @@ Example adding medical terms, so words like _acanthopterygious_ can be found.
645636

646637
**VS Code Settings**
647638

648-
```js
639+
```jsonc
649640
"cSpell.customDictionaries": {
650641
"myWords": {
651642
"name": "myWords",
@@ -670,15 +661,13 @@ This file can be either at the project root or in the .vscode directory.
670661

671662
Example adding medical terms, where the terms are checked into the project and we only want to use it for .md files.
672663

673-
```javascript
664+
```jsonc
674665
{
675666
"dictionaryDefinitions": [
676-
{ "name": "medicalTerms", "path": "./dictionaries/medicalterms-en.txt"},
677-
{ "name": "cities", "path": "./dictionaries/cities.txt"}
678-
],
679-
"dictionaries": [
680-
"cities"
667+
{ "name": "medicalTerms", "path": "./dictionaries/medicalterms-en.txt" },
668+
{ "name": "cities", "path": "./dictionaries/cities.txt" }
681669
],
670+
"dictionaries": ["cities"],
682671
"languageSettings": [
683672
{ "languageId": "markdown", "dictionaries": ["medicalTerms"] },
684673
{ "languageId": "plaintext", "dictionaries": ["medicalTerms"] }
@@ -727,7 +716,7 @@ interface DictionaryDefinition {
727716

728717
**VS Code Settings**
729718

730-
```js
719+
```jsonc
731720
"cSpell.customDictionaries": {
732721
"project-words": {
733722
"name": "project-words",

0 commit comments

Comments
 (0)