-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cspell common dictionary and example snippet
- Loading branch information
1 parent
6e945a7
commit 18422ec
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", | ||
"version": "0.2", | ||
"allowCompoundWords": false, | ||
"caseSensitive": true, | ||
"dictionaries": [ | ||
"bash", | ||
"turo-dictionary", | ||
"css", | ||
"en-gb", | ||
"fonts", | ||
"html", | ||
"powershell", | ||
"node", | ||
"npm", | ||
"typescript" | ||
], | ||
"dictionaryDefinitions": [ | ||
{ | ||
"addWords": true, | ||
"name": "turo-dictionary", | ||
"path": "./hooks/cspell/turo-dictionary.txt" | ||
} | ||
], | ||
"ignoreRegExpList": ["^.*TODO.*"], | ||
"ignorePaths": [ | ||
"./hooks/cspell/turo-dictionary.txt", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Cspell Dictionary | ||
|
||
This `hooks/cspell` directory is not an actual `pre-commit` hook to be referenced by `id`, but a common dictionary that can be extended in repos that use `pre-commit` to avoid duplicating frequent (and Turo-specific) terminology. | ||
|
||
```json | ||
// cspell.jsonc | ||
{ | ||
"dictionaries": [ | ||
"turo-dictionary" | ||
], | ||
"dictionaryDefinitions": [ | ||
{ | ||
"name": "turo-dictionary", | ||
// TODO (@michaeljaltamirano): Update path | ||
"path": "https://raw.githubusercontent.com/turo/pre-commit-hooks/spike/testing-cspell-integration-michael/hooks/cspell/turo-dictionary.txt", | ||
"addWords": true | ||
} | ||
], | ||
} | ||
``` | ||
|
||
It's a requirement for the dictionary to be referenced at the project-level `cspell.json` file, so we cannot bake a Turo-specific configuration within this repo as a `pre-commit` hook. The next best option is making the dictionary available via HTTP GET to be pulled into repo-specific configurations. This repo has a file in `~/cspell.jsonc` that can be used as a reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This is a comment | ||
# "Forbidden" syntax: !forbiddenword | ||
autofix | ||
benn | ||
bugsnag | ||
Bugsnag | ||
carculator | ||
checkin | ||
cohorting | ||
cohosts | ||
commitlint | ||
dtos | ||
expedia | ||
ezpass | ||
figma | ||
flagr | ||
gdpr | ||
grecaptcha | ||
Iata | ||
iata | ||
itunes | ||
jfrog | ||
kustomer | ||
latlng | ||
lngs | ||
lurleen | ||
miata | ||
michaeljaltamirano | ||
mitek | ||
mvsc | ||
mweb | ||
nissay | ||
pois | ||
prereqs | ||
pricings | ||
qrcode | ||
schu | ||
schumi | ||
signup | ||
storyblok | ||
teamcity | ||
toolo | ||
# Note: "traveller" is a misspelling of "traveler" | ||
traveller | ||
turo | ||
twilio | ||
uber | ||
vals |