Skip to content

Commit

Permalink
Merge pull request #102 from barrymun/feature/spellcheck
Browse files Browse the repository at this point in the history
Codebase spell checker
  • Loading branch information
Mathys-Gasnier authored Jan 2, 2025
2 parents d4d8417 + 7127ceb commit d00e21b
Show file tree
Hide file tree
Showing 8 changed files with 1,387 additions and 354 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pre-commit-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pre-commit checks

on:
pull_request:
branches:
- '**'

jobs:
pre-commit-checks:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci

- name: Run cspell
run: npm run cspell

- name: Run lint
run: npm run lint

- name: Run build
run: npm run build
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
npm run cspell
npm run lint
npm run build
1 change: 1 addition & 0 deletions cspell-dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quicksnip
16 changes: 16 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"dictionaryDefinitions": [
{
"name": "workspace",
"path": "./cspell-dict.txt",
"description": "Custom Workspace Dictionary",
"addWords": true
}
],
"dictionaries": ["workspace"],
"ignorePaths": [
"node_modules",
"dist",
"public"
]
}
1,686 changes: 1,334 additions & 352 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"format:check": "prettier --check .",
"preview": "vite preview",
"prepare": "husky",
"cspell": "cspell --config cspell.json \"**/*.{ts,tsx,js,jsx,json,html}\"",
"snippets:check": "node ./utils/checkSnippetFormatting.js",
"snippets:consolidate": "node ./utils/consolidateSnippets.js"
},
Expand All @@ -31,6 +32,7 @@
"@types/react-dom": "^18.3.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react-swc": "^3.5.0",
"cspell": "^8.17.1",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/CategoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const CategoryList = () => {

if (loading) return <div>Loading...</div>;

if (error) return <div>Error occured: {error}</div>;
if (error) return <div>Error occurred: {error}</div>;

return (
<ul role="list" className="categories">
Expand Down
2 changes: 1 addition & 1 deletion src/components/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CopyToClipboard = ({ text, ...props }: Props) => {
setIsCopied(true);
setTimeout(() => setIsCopied(false), 2000);
})
.catch((err) => alert("Error occured: " + err));
.catch((err) => alert("Error occurred: " + err));
};

return (
Expand Down

0 comments on commit d00e21b

Please sign in to comment.