Add cspell dictionary
Description
These are some small repo changes that I've had locally for a little while and on't want to keep git-ignoring locally or stashing every PR
- Add Code spell checker as a workspace recommended extension
- Add
.vscode/cspell.jsonto include a dictionary of words used in this project for the spell checker - Add
@ts-expect-errorinCesiumSandcastlebecause it's using the "wrong"requirefunction and if you have JS Type checking on it flags the entire file
Code Spell Checker
Code spell checker is really helpful when coding to make sure variable names and strings are spelled correctly. Longer term we may want to add cspell as a CI or pre-commit check but right now there's too many words that would be flagged as incorrect to justify that effort. To that end I do want to push people to use the extension more and collectively, gradually build up the dictionary until we're at a point there are very few flagged words and using the cli is more seemless.
When a word is flagged you just have to put the cursor on it and trigger the VSCode suggestion window Ctrl+. for me. Then just make sure you select the cspell.json file to make sure it's added to the repo's dictionary instead of your user or workspace settings.
@ggetz I know we discussed this and I think you have a list of words already in your user settings, feel free to copy those over and commit to this branch if you have a bunch to add intantly
Issue number and link
Part of https://github.com/CesiumGS/cesium/issues/11954
Testing plan
Not much to test. You can try turning on JS type checking for the sandcastle if you want, just be aware there are still lots of other TS errors we have in the library. Add the extension if you don't already have it and flag a word and make sure you understand how to add words to our dictionary.
Author checklist
- [ ] I have submitted a Contributor License Agreement
- [ ] I have added my name to
CONTRIBUTORS.md - [ ] I have updated
CHANGES.mdwith a short summary of my change - [ ] I have added or updated unit tests to ensure consistent code coverage
- [ ] I have update the inline documentation, and included code examples where relevant
- [ ] I have performed a self-review of my code
Thank you for the pull request, @jjspace!
:white_check_mark: We can confirm we have a CLA on file for you.