cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Add cspell dictionary

Open jjspace opened this issue 1 year ago • 1 comments

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

  1. Add Code spell checker as a workspace recommended extension
  2. Add .vscode/cspell.json to include a dictionary of words used in this project for the spell checker
  3. Add @ts-expect-error in CesiumSandcastle because it's using the "wrong" require function and if you have JS Type checking on it flags the entire file 2024-04-23_11-52

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.

2024-04-23_11-54 2024-04-23_11-54_1

@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.md with 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

jjspace avatar Apr 23 '24 16:04 jjspace

Thank you for the pull request, @jjspace!

:white_check_mark: We can confirm we have a CLA on file for you.

github-actions[bot] avatar Apr 23 '24 16:04 github-actions[bot]