diff --git a/app/package-lock.json b/app/package-lock.json index 9c3fdba..f98a6a2 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -40,6 +40,7 @@ "@types/node": "^22.14.0", "@types/react": "^18.3.20", "@types/react-dom": "^18.3.6", + "@types/react-syntax-highlighter": "^15.5.13", "@vitejs/plugin-react": "^4.3.4", "postcss": "^8.4.47", "postcss-preset-mantine": "^1.17.0", @@ -2077,6 +2078,16 @@ "@types/react": "^18.0.0" } }, + "node_modules/@types/react-syntax-highlighter": { + "version": "15.5.13", + "resolved": "https://registry.npmjs.org/@types/react-syntax-highlighter/-/react-syntax-highlighter-15.5.13.tgz", + "integrity": "sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -5432,9 +5443,9 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/app/package.json b/app/package.json index a75a83e..6ce1c27 100644 --- a/app/package.json +++ b/app/package.json @@ -56,6 +56,7 @@ "@types/node": "^22.14.0", "@types/react": "^18.3.20", "@types/react-dom": "^18.3.6", + "@types/react-syntax-highlighter": "^15.5.13", "@vitejs/plugin-react": "^4.3.4", "postcss": "^8.4.47", "postcss-preset-mantine": "^1.17.0", diff --git a/app/src/api/git.ts b/app/src/api/git.ts index d76091d..eb8cbe0 100644 --- a/app/src/api/git.ts +++ b/app/src/api/git.ts @@ -1,5 +1,6 @@ import { API_BASE_URL } from '@/types/authApi'; import { apiCall } from './api'; +import { CommitHash } from '@/types/git'; /** * pullChanges fetches the latest changes from the remote repository diff --git a/app/src/hooks/useGitOperations.ts b/app/src/hooks/useGitOperations.ts index d2abee0..5930799 100644 --- a/app/src/hooks/useGitOperations.ts +++ b/app/src/hooks/useGitOperations.ts @@ -2,6 +2,7 @@ import { useCallback } from 'react'; import { notifications } from '@mantine/notifications'; import { pullChanges, commitAndPush } from '../api/git'; import { useWorkspace } from '../contexts/WorkspaceContext'; +import { CommitHash } from '@/types/git'; interface UseGitOperationsResult { handlePull: () => Promise; diff --git a/app/src/index.html b/app/src/index.html index 863830b..ed2abbc 100644 --- a/app/src/index.html +++ b/app/src/index.html @@ -8,6 +8,6 @@
- + diff --git a/app/src/types/git.ts b/app/src/types/git.ts index cb768b9..58fc90e 100644 --- a/app/src/types/git.ts +++ b/app/src/types/git.ts @@ -1 +1 @@ -type CommitHash = string; +export type CommitHash = string; diff --git a/app/tsconfig.json b/app/tsconfig.json index 8f73c95..36b0596 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -1,36 +1,59 @@ { "compilerOptions": { + /* Language and Environment */ "target": "ES2020", - "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, "jsx": "react-jsx", + "useDefineForClassFields": true, - /* Linting */ - "strict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noFallthroughCasesInSwitch": true, - - /* Paths */ + /* Modules */ + "module": "ESNext", + "moduleResolution": "bundler", "baseUrl": ".", "paths": { "@/*": ["src/*"] }, + "resolveJsonModule": true, + "allowImportingTsExtensions": true, + "isolatedModules": true, - /* Type checking */ - "allowJs": true, + /* JavaScript Support */ + "allowJs": false, "checkJs": false, - "forceConsistentCasingInFileNames": true + + /* Emit */ + "noEmit": true, + "sourceMap": true, + "outDir": "./dist", + + /* Type Checking */ + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "useUnknownInCatchVariables": true, + "alwaysStrict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + + /* Completeness */ + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + + /* Additional Checks */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "exactOptionalPropertyTypes": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true }, - "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules", "dist"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/app/tsconfig.node.json b/app/tsconfig.node.json index 42872c5..b3e05ae 100644 --- a/app/tsconfig.node.json +++ b/app/tsconfig.node.json @@ -1,10 +1,33 @@ { "compilerOptions": { + /* Basic Options */ "composite": true, - "skipLibCheck": true, "module": "ESNext", "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true + "target": "ES2020", + + /* Strict Type-Checking Options */ + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "alwaysStrict": true, + + /* Additional Checks */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + + /* Module Resolution Options */ + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true }, "include": ["vite.config.ts"] }