Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
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.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"preview": "vite preview",
"prepare": "husky"
"prepare": "husky",
"cspell": "cspell --config cspell.json \"**/*.{ts,tsx,js,jsx,json,html}\""
},
"dependencies": {
"prismjs": "^1.29.0",
Expand All @@ -28,6 +29,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
5 changes: 3 additions & 2 deletions src/hooks/useLanguages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { LanguageType } from "@types";
import { useFetch } from "./useFetch";

export const useLanguages = () => {
const { data, loading, error } =
useFetch<LanguageType[]>("/consolidated/_index.json");
const { data, loading, error } = useFetch<LanguageType[]>(
"/consolidated/_index.json"
);

return { fetchedLanguages: data || [], loading, error };
};