Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent VSCode CSpell from checking all code files
The VSCode CSpell extension (aka "code-spell-checker") 4.0.19 release (2024-11-19) changed the `enabledFileTypes` setting default to make it "easier to extend." The change also made CSpell check all words in all code files, resulting in a noticeable increase in spell check errors reported by the extension. The `"cSpell.enabledFileTypes": { "*": false }` setting suggested in streetsidesoftware/vscode-spell-checker#3800 does not work correctly (streetsidesoftware/vscode-spell-checker#3836). Languages must be configured individually. This commit will update `cspell.json` to configure common code languages. - Ruby is disabled to avoid checking commented-out lines in Brewfiles. - Excluding HTML from the `languageSettings` array will allow CSpell to check not only comments, but also prose elements like `<p>`. It's not clear how to also check prose elements in JavaScript components. - When checking Astro, Vue, and other component languages, CSpell should check HTML, CSS, and JS comments. All may occur in a single file. - When checking shell, CSpell should ignore array length references (in Bash, the length of an array can be read with `${#ARRAY_NAME}`). - CSpell still seems to be spell checking keys in VSCode `settings.json` even though JSONC is correctly configured to only check comments. https://cspell.org/configuration/ https://github.com/streetsidesoftware/vscode-spell-checker/releases/tag/code-spell-checker-v4.0.19
- Loading branch information