diff --git a/interface/package.json b/interface/package.json index 9800ac8a..ece2d640 100644 --- a/interface/package.json +++ b/interface/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite build --watch", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" diff --git a/interface/src/App.d.ts b/interface/src/App.d.ts deleted file mode 100644 index a779349e..00000000 --- a/interface/src/App.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface SettingsState { - notificationCollector: boolean; - lessonAlerts: boolean; - animatedBackground: boolean; - animatedBackgroundSpeed: boolean; - customThemeColor: string; - betterSEQTAPlus: boolean; -} -declare const App: React.FC; -export default App; diff --git a/interface/src/App.tsx b/interface/src/App.tsx index ea173fd1..7878c315 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -1,5 +1,5 @@ // App.tsx -import { useState } from 'react'; +import React, { useState } from 'react'; import TabbedContainer from './components/TabbedContainer'; import Settings from './pages/Settings'; import logo from './assets/betterseqta-dark-full.png'; diff --git a/interface/src/components/ColorPicker.tsx b/interface/src/components/ColorPicker.tsx index 84bd298d..4719d4ba 100644 --- a/interface/src/components/ColorPicker.tsx +++ b/interface/src/components/ColorPicker.tsx @@ -1,7 +1,5 @@ -// TODO: Create types for ColorPicker -// @ts-expect-error No typescript declarations available import ColorPicker from 'react-best-gradient-color-picker'; -import { useState, useRef, useEffect } from 'react'; +import React, { useState, useRef, useEffect } from 'react'; interface ColorPickerProps { color: string; diff --git a/interface/src/declarations.d.ts b/interface/src/declarations.d.ts deleted file mode 100644 index b8bae3ed..00000000 --- a/interface/src/declarations.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '*.png'; \ No newline at end of file diff --git a/interface/src/index.d.ts b/interface/src/index.d.ts deleted file mode 100644 index b8bae3ed..00000000 --- a/interface/src/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '*.png'; \ No newline at end of file diff --git a/interface/src/main.d.ts b/interface/src/main.d.ts index 6a9a4b13..f94c3d5e 100644 --- a/interface/src/main.d.ts +++ b/interface/src/main.d.ts @@ -1 +1,6 @@ import './index.css'; + +declare module "*.png"; +declare module "*.svg"; +declare module "*.jpeg"; +declare module "*.jpg"; diff --git a/interface/tailwind.config.js b/interface/tailwind.config.js index f8712b73..1cc7babf 100644 --- a/interface/tailwind.config.js +++ b/interface/tailwind.config.js @@ -4,7 +4,6 @@ export default { "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], - important: true, darkMode: "class", theme: { fontSize: { diff --git a/interface/tsconfig.json b/interface/tsconfig.json index 36d55c79..a7fc6fbf 100644 --- a/interface/tsconfig.json +++ b/interface/tsconfig.json @@ -20,6 +20,6 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["../src/src"], + "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..647e9a3e --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2016", + "useDefineForClassFields": true, + "lib": ["ES2016", "DOM", "DOM.Iterable"], + "module": "ES2015", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": false, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": false, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, +}