From ac322e08e05588b02631e813e5a1e23954bb7b19 Mon Sep 17 00:00:00 2001 From: Prozilla Date: Tue, 7 May 2024 23:46:02 +0200 Subject: [PATCH] Migration to TypeScript - Stage 3 Added typescript linting --- docs/README.md | 6 +- docs/features/actions/README.md | 14 +- docs/features/apps/README.md | 16 +- docs/features/apps/terminal/README.md | 10 +- docs/features/settings/README.md | 4 +- docs/features/virtual-drive/README.md | 4 +- docs/roadmap/README.md | 4 - eslint.config.js | 59 + package-lock.json | 3871 ++++++++++------- package.json | 73 +- src/components/actions/Actions.tsx | 4 +- .../actions/actions/DropdownAction.tsx | 4 +- .../actions/actions/RadioAction.tsx | 4 +- .../actions/actions/ToggleAction.tsx | 4 +- src/components/apps/browser/Browser.tsx | 8 +- src/components/apps/calculator/Calculator.tsx | 4 +- .../directory-list/DirectoryList.tsx | 4 +- .../apps/media-viewer/MediaViewer.tsx | 11 +- src/components/apps/settings/Settings.tsx | 10 +- .../apps/settings/tabs/AppearanceSettings.tsx | 2 +- .../apps/text-editor/TextEditor.tsx | 13 +- src/components/modals/ModalView.tsx | 9 +- .../modals/file-properties/FileProperties.tsx | 2 +- src/components/modals/share/Share.tsx | 4 +- src/components/windows/WindowFallbackView.tsx | 4 +- src/config/apps/textEditor.config.ts | 4 + src/features/apps/app.tsx | 6 +- .../virtual-drive/file/virtualFile.ts | 2 + .../virtual-drive/root/defaultData.ts | 10 +- src/hooks/modals/contextMenu.tsx | 16 - src/index.tsx | 1 - tsconfig.json | 108 +- 32 files changed, 2407 insertions(+), 1888 deletions(-) create mode 100644 eslint.config.js diff --git a/docs/README.md b/docs/README.md index a28d906..51849a2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -46,7 +46,7 @@ See [docs/configuration](configuration/README.md) for more information. - [src](../src) directory - Contains all code for the application, including CSS, JS and HTML files. This directory makes use of a feature-based folder structure. + Contains all code for the application, including CSS, JS and HTML files. This directory makes use of a feature-based folder structure. Utility files are often separated into their own subdirectory, called `_utils`, inside of their respective directory. - [public](../public) directory @@ -65,8 +65,8 @@ See [docs/configuration](configuration/README.md) for more information. Type | Case | Example --- | --- | --- Folders | kebab-case | `virtual-drive` -`.js` files | camelCase | `virtualRoot.js` -`.jsx` files | PascalCase | `Desktop.jsx` +`.ts` files | camelCase | `virtualRoot.ts` +`.tsx` files | PascalCase | `Desktop.tsx` `.css` files & files in `public` dir | kebab-case | `global.css` Local `.module.css` files | PascalCase | `Desktop.module.css` Global `.module.css` files | kebab-case | `utils.module.css` diff --git a/docs/features/actions/README.md b/docs/features/actions/README.md index a84d6cb..93387d8 100644 --- a/docs/features/actions/README.md +++ b/docs/features/actions/README.md @@ -6,7 +6,7 @@ A React component used to group and display actions together. This is used in th ## Example -```jsx +```tsx -``` \ No newline at end of file +``` + +## Action types + +Name | HTML equivalent +--- | -- +Click action | \