Skip to content

Commit

Permalink
Configure spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Oct 16, 2024
1 parent d351687 commit b85e3a9
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 30 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ name: CI
on: [push, pull_request]

jobs:
spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node
env:
DISABLE_V8_COMPILE_CACHE: "1"
uses: actions/setup-node@v4
with:
node-version: "20.9"

- name: Run cspell
run: |
yarn global add cspell
cspell
lint_ruby:
runs-on: ubuntu-latest
steps:
Expand Down
30 changes: 0 additions & 30 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,5 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
},
"cSpell.languageSettings": [
{
"languageId": "*",
"locale": "en",
"dictionaries": [
"wordsEn"
]
},
{
"languageId": "*",
"locale": "en-US",
"dictionaries": [
"wordsEn"
]
},
{
"languageId": "*",
"dictionaries": [
"companies",
"softwareTerms",
"misc"
]
},
{
"languageId": "ruby",
"dictionaries": [
"ruby"
]
}
],
}
37 changes: 37 additions & 0 deletions cspell.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": "0.2",
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./project-words",
"addWords": true
}
],
// cspell recognizes 'addon' as valid but we want to enforce 'add-on', but not within code
"words": [
"!addon"
],
"ignoreRegExpList": [
"\\.addon",
"addon\\.",
"\\(addon\\)",
"@addon",
"_addon",
"addon\\w+",
"addon_",
"addon\"",
"addon =",
"$\\s+addon^",
"\\|addon\\|",
"addon$" // could have false positives but unlikely
],
"language": "en",
"files": ["**/*.rb", "**/*.md", "**/*.markdown"],
"ignorePaths": [
"**/node_modules/**",
"vendor/**",
"coverage/**",
"test/fixtures/",
],
"dictionaries": ["ruby", "en_US", "shell", "file-types", "project-words", "companies", "softwareTerms", "misc"]
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"cspell": "^8.14.4"
}
}

0 comments on commit b85e3a9

Please sign in to comment.