Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codebase spell checker #102

Merged
merged 10 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/pre-commit-checks.yml
psychlone77 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading