Skip to content

Commit

Permalink
Add cspell Config
Browse files Browse the repository at this point in the history
This adds a `.cspell` config which is automatically used for both the VS Code extension (https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) and the GitHub Action https://github.com/marketplace/actions/cspell-action

- The GitHub Action is added but is set to NOT be strict so it won't fail if there is a typo. (I thought it might be annoying if there are false positives). But typos will be displayed in the 'Files changed' view on GitHub Web Ui for Pull requests
- The VS Code extension is recommended to be used for users opening the project in VS Code.

Hopefully these changes will help prevent typos from entering the codebase.

FYI: You can also run `npx cspell \"**/*.*\" --no-progress` from root to perform a spellcheck.
  • Loading branch information
coliff committed Sep 5, 2024
1 parent 31ee6eb commit 9585567
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 0 deletions.
230 changes: 230 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
{
"version": "0.2",
"words": [
"Aabb",
"ABAC",
"ACAC",
"afterjs",
"APAB",
"APAC",
"arcgis",
"Astro",
"babylonjs",
"bbox",
"bboxes",
"beforejs",
"Bounde",
"buble",
"carto",
"choropleth",
"CIELAB",
"CJKV",
"Clov",
"codecov",
"Cpath",
"Csvg",
"dbclick",
"dedos",
"deduped",
"Delle",
"desplazamiento",
"distjs",
"dlopen",
"documentationjs",
"easings",
"echartslayer",
"Epanechnikov",
"EPSG",
"falsey",
"flatgeobuf",
"flyto",
"GCEZ",
"Geobuf",
"getx",
"gety",
"glfx",
"GLJS",
"GLSL",
"GLTF",
"Gods’illa",
"gokun",
"gzipped",
"hacer",
"highp",
"Hoare",
"ifdefs",
"iframes",
"iife",
"imagecoord",
"incentivizing",
"inlinehilite",
"insee",
"instanceof",
"interp",
"jank",
"Jawg",
"jsons",
"kdbush",
"Klass",
"Kogod",
"komoot",
"lerp",
"libglew",
"libpango",
"librsvg",
"libxi",
"lowp",
"Luxemburg",
"mapa",
"maplibregl",
"mapme",
"mappedin",
"marcacci",
"MBGL",
"mbsv",
"mediump",
"Merc",
"merp",
"MIERUNE",
"mihalyi",
"mkdocs",
"mlcontour",
"mousein",
"mouseup",
"mozfullscreenchange",
"MSAA",
"msvs",
"Muhsinah",
"mult",
"Mycroft",
"Napoli",
"Nauticals",
"nbsp",
"nise",
"nofollow",
"nohup",
"noopener",
"Noto",
"nvmrc",
"Oberstein",
"Offc",
"onmozfullscreenchange",
"onmsfullscreenchange",
"onomy",
"onstyleimagemissing",
"onwarn",
"orta",
"OSMUS",
"OTLS",
"outofmaxbounds",
"OVERSCALETILEID",
"pango",
"perp",
"píng",
"Plantes",
"plantuml",
"plpopup",
"PLSS",
"pmtiles",
"pngjs",
"Postg",
"protobuf",
"pygments",
"pymdownx",
"qrcode",
"Rebranded",
"rfid",
"rgba",
"rtoggle",
"rtree",
"sdfgamma",
"slugg",
"splc",
"spys",
"SRPS",
"stringifiable",
"Struct",
"tada",
"tcpopup",
"testem",
"testid",
"threejs",
"tinysdf",
"tipopup",
"tlbr",
"trfilter",
"trheader",
"Trocadéro",
"trpopup",
"Truckeroo",
"tsdoc",
"tsnode",
"tstypes",
"Tulherias",
"ubyte",
"unassert",
"unblended",
"unbundle",
"unclustered",
"unflipped",
"unitbezier",
"unminified",
"Unpitched",
"unpremultiplied",
"unproject",
"unrotated",
"unscale",
"unserialize",
"unsets",
"unthrottled",
"untransitioned",
"unversioned",
"USGS",
"Utilice",
"vaos",
"verticalizable",
"verticalized",
"WCAG",
"webgl",
"webglcontextcreationerror",
"webglcontextlost",
"webglcontextrestored",
"webp",
"whoots",
"Wijk",
"wrsheader",
"wrslegend",
"wrslist",
"Xfrom",
"Xhalf",
"xlink",
"Xmax",
"Xmin",
"xvfb",
"Yhalf",
"Ymax",
"Ymin",
"Zanabazar",
"zelinsky",
"Zfrom",
"zoomto",
"ZULN"
],
"allowCompoundWords": true,
"language": "en,en-GB,en-US,es-ES",
"ignorePaths": [
"**/*.geojson",
"**/*.glsl",
"**/*.gltf",
"**/*.json",
"**/*.pbf",
"**/*.svg",
"**/*.ts"
],
"ignoreRegExpList": [
"@\\w+",
"\\[\\w+",
"// '\\w+'"
],
"useGitignore": true
}
25 changes: 25 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Check spelling"
on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
spellcheck:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v6
with:
check_dot_files: false
incremental_files_only: true
inline: warning
strict: false
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"streetsidesoftware.code-spell-checker",
"stylelint.vscode-stylelint"
]
}

0 comments on commit 9585567

Please sign in to comment.