-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/typescript #50
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
Merged
Merged
Feat/typescript #50
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
49ecaac
Initial typescript setup
lordmathis e4fb276
Migrate utils to ts
lordmathis 46e4897
Add TypeScript types for App component
lordmathis 0769aa2
Fix default database URL and type in Config
lordmathis e789025
Refactor authentication API service to TypeScript
lordmathis 043eab4
Migrating from services to dedicated API files
lordmathis 8849dee
Migrate admin API to typescript
lordmathis 905df9f
Migrate file api ops to ts
lordmathis 66fe5e4
Migrate user api to ts
lordmathis 02c8100
Migrate workspace api to ts
lordmathis 1e350bb
Migrate git api to ts
lordmathis 1a06c31
Migrate AuthContext
lordmathis 14b1a46
Migrate ModalContext and WorkspaceContext
lordmathis bc60cb3
Migrate useAdminData to TypeScript with improved type safety and erro…
lordmathis 1c477f1
Migrate useFileContent hook
lordmathis a7c83d0
Migrate useFileList
lordmathis 5dc427c
Migrate useFileNavigation hook
lordmathis f3691d4
Migrate useFileOperations
lordmathis 32cb89d
Migrate useGitOperations
lordmathis c6d46df
Migrate useLastOpenedFile hook
lordmathis 5fcd24d
Migrate useProfileSettings hook
lordmathis b7be5a4
Migrate useUserAdmin
lordmathis 924d710
Migrate all modals to ts
lordmathis c478e8e
Migrate account settings
lordmathis 7044e42
Migrate admin dashboard to ts
lordmathis 9125cbd
Migrate workspace settings to ts
lordmathis a8a5255
Migrate navigation to ts
lordmathis 834a7b1
Migrate layout
lordmathis db75bdc
Migrate file components
lordmathis bfc5cc2
Migrate edito components
lordmathis 3619cf4
Update ts configuration
lordmathis 60ab01b
Fix type-check issues
lordmathis 16fbbec
Configure eslint
lordmathis 2f181d0
Run npm lint:fix
lordmathis 32218e5
Refactor types
lordmathis 646a897
Fix some lint issues
lordmathis ad2334c
Refactor imports and handle async operations in components
lordmathis 78de42d
Fix various eslint issues
lordmathis 2519d46
Refactor Node component to destructure props and improve onNodeClick …
lordmathis 623f619
Fix more lint issues
lordmathis e43efc7
Refactor type definitions in AuthenticatedContent and App components
lordmathis 15538b2
Refactor theme styles for hover, accordion, and workspace components
lordmathis f511daf
Refactor ESLint config
lordmathis ab3cb56
Add IF NOT EXISTS clause to index creation for sessions and workspace…
lordmathis 07e0647
Refactor type guards for LoginResponse and UserRole to improve valida…
lordmathis 34ac76b
Fix async handling for API response in updateProfile and workspace fu…
lordmathis 6cf1182
Update Workspace interface for optional properties
lordmathis a724bc4
Refactor workspace context usage to improve structure and introduce T…
lordmathis ecc1fe9
Fix logout button
lordmathis d2c4a84
Refactor API call to include CSRF token handling for non-GET requests
lordmathis fe2a466
Add URL decoding for workspace and file paths in handlers
lordmathis f3f2dee
Update default DBURL to use sqlite:// format in DefaultConfig
lordmathis ca602bd
Refactor TypeScript workflow to set working directory in defaults
lordmathis 3926a27
Fix cache dependency path in TypeScript workflow
lordmathis 694f842
Merge pull request #49 from lordmathis/workspace_context
lordmathis 63f3679
Merge branch 'main' into feat/typescript
lordmathis 47b88cb
Potential fix for code scanning alert no. 7: Workflow does not contai…
lordmathis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: TypeScript Type Check | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "*" | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| type-check: | ||
| name: TypeScript Type Check | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./app | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
| cache: "npm" | ||
| cache-dependency-path: "./app/package-lock.json" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run TypeScript type check | ||
| run: npm run type-check | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint | ||
| continue-on-error: true | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| import { defineConfig, globalIgnores } from 'eslint/config'; | ||
| import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
| import react from 'eslint-plugin-react'; | ||
| import reactHooks from 'eslint-plugin-react-hooks'; | ||
| import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
| import tsParser from '@typescript-eslint/parser'; | ||
| import path from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import js from '@eslint/js'; | ||
| import { FlatCompat } from '@eslint/eslintrc'; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = path.dirname(__filename); | ||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| recommendedConfig: js.configs.recommended, | ||
| allConfig: js.configs.all, | ||
| }); | ||
|
|
||
| export default defineConfig([ | ||
| globalIgnores([ | ||
| '**/node_modules', | ||
| '**/dist', | ||
| '**/build', | ||
| '**/coverage', | ||
| '**/public', | ||
| '**/*.js', | ||
| '**/vite.config.ts', | ||
| '**/eslint.config.mjs', | ||
| ]), | ||
| { | ||
| extends: fixupConfigRules( | ||
| compat.extends( | ||
| 'eslint:recommended', | ||
| 'plugin:react/recommended', | ||
| 'plugin:react-hooks/recommended', | ||
| 'plugin:@typescript-eslint/recommended', | ||
| 'plugin:@typescript-eslint/recommended-requiring-type-checking' | ||
| ) | ||
| ), | ||
|
|
||
| plugins: { | ||
| react: fixupPluginRules(react), | ||
| 'react-hooks': fixupPluginRules(reactHooks), | ||
| '@typescript-eslint': fixupPluginRules(typescriptEslint), | ||
| }, | ||
|
|
||
| languageOptions: { | ||
| parser: tsParser, | ||
| ecmaVersion: 2022, | ||
| sourceType: 'module', | ||
|
|
||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
|
|
||
| project: './tsconfig.json', | ||
| }, | ||
| }, | ||
|
|
||
| settings: { | ||
| react: { | ||
| version: 'detect', | ||
| }, | ||
| }, | ||
|
|
||
| rules: { | ||
| 'no-console': [ | ||
| 'warn', | ||
| { | ||
| allow: ['warn', 'error', 'debug'], | ||
| }, | ||
| ], | ||
|
|
||
| 'no-duplicate-imports': 'error', | ||
| 'no-unused-vars': 'off', | ||
| 'react/prop-types': 'off', | ||
| 'react/react-in-jsx-scope': 'off', | ||
| 'react-hooks/rules-of-hooks': 'error', | ||
| 'react-hooks/exhaustive-deps': 'warn', | ||
| '@typescript-eslint/explicit-module-boundary-types': 'off', | ||
| '@typescript-eslint/no-explicit-any': 'warn', | ||
|
|
||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'warn', | ||
| { | ||
| argsIgnorePattern: '^_', | ||
| varsIgnorePattern: '^_', | ||
| caughtErrorsIgnorePattern: '^_', | ||
| }, | ||
| ], | ||
|
|
||
| '@typescript-eslint/consistent-type-imports': [ | ||
| 'warn', | ||
| { | ||
| prefer: 'type-imports', | ||
| }, | ||
| ], | ||
|
|
||
| '@typescript-eslint/no-misused-promises': 'warn', | ||
| '@typescript-eslint/no-floating-promises': 'warn', | ||
| '@typescript-eslint/unbound-method': 'off', | ||
| '@typescript-eslint/no-non-null-assertion': 'warn', | ||
| }, | ||
| }, | ||
| ]); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.