Spell Checking - hackforla/tdm-calculator GitHub Wiki

Follow these instructions to perform spell checking on the TDM application source code.

  1. From your development environment, open a terminal on the root directory
  2. Run npm run spellcheck
  3. If there is any output, you should create a feature branch to make the changes below.
  4. The output will show one line for each candidate misspelling. Look at each line and study the referenced line of code.
  • If it is an actual misspelling, fix the spelling in the code.
  • If it is a non-word that is part of the TDM vernacular, add it to the ./project-words.txt file.
  • If it is a string in code that doesn't appear in the UI, for example client-side routing paths, that are following a convention that the spell checker doesn't recognize, also add it to the ./project-words.txt file.
  1. Repeat the above steps until you can run npm run spellcheck and produce no findings.
  2. Create a PR with these changes and push the PR to GitHub.

To perform spellchecking on the database:

  1. Open a terminal to the root directory
  2. Navigate to the ./server directory
  3. Run npm run spellcheck_db
  4. If there is any output:
  • If it is a non-word that is part of the TDM vernacular, add it to the ./project-words.txt file.
  • If it is a genuine spelling error, submit an issue and paste the output in the description.

ex. CSpell output:

server/db/spelling_test/output_csv/[CalculationRule].csv:109:110 - Unknown word (Requiremant)
server/db/spelling_test/output_csv/[CalculationRule].csv:126:50 - Unknown word (unbundle)
server/db/spelling_test/output_csv/[CalculationRule].csv:885:85 - Unknown word (Parkng)
server/db/spelling_test/output_csv/[CalculationRule].csv:885:106 - Unknown word (Industial)
server/db/spelling_test/output_csv/[CalculationRule].csv:886:28 - Unknown word (WAREHOUSEINDUSTRIAL)
server/db/spelling_test/output_csv/[CalculationRule].csv:886:119 - Unknown word (Parkng)```