diff --git a/app.config.js b/app.config.ts similarity index 100% rename from app.config.js rename to app.config.ts diff --git a/app/(app)/_layout.jsx b/app/(app)/_layout.tsx similarity index 100% rename from app/(app)/_layout.jsx rename to app/(app)/_layout.tsx diff --git a/app/(app)/classes.jsx b/app/(app)/classes.tsx similarity index 100% rename from app/(app)/classes.jsx rename to app/(app)/classes.tsx diff --git a/app/(app)/index.jsx b/app/(app)/index.tsx similarity index 100% rename from app/(app)/index.jsx rename to app/(app)/index.tsx diff --git a/app/(app)/settings.jsx b/app/(app)/settings.tsx similarity index 100% rename from app/(app)/settings.jsx rename to app/(app)/settings.tsx diff --git a/app/_layout.jsx b/app/_layout.tsx similarity index 100% rename from app/_layout.jsx rename to app/_layout.tsx diff --git a/app/add-assignment.jsx b/app/add-assignment.tsx similarity index 100% rename from app/add-assignment.jsx rename to app/add-assignment.tsx diff --git a/app/add-class.jsx b/app/add-class.tsx similarity index 100% rename from app/add-class.jsx rename to app/add-class.tsx diff --git a/app/all-classes.jsx b/app/all-classes.tsx similarity index 100% rename from app/all-classes.jsx rename to app/all-classes.tsx diff --git a/app/edit-assignment.jsx b/app/edit-assignment.tsx similarity index 100% rename from app/edit-assignment.jsx rename to app/edit-assignment.tsx diff --git a/app/edit-class.jsx b/app/edit-class.tsx similarity index 100% rename from app/edit-class.jsx rename to app/edit-class.tsx diff --git a/app/sign-in.jsx b/app/sign-in.tsx similarity index 100% rename from app/sign-in.jsx rename to app/sign-in.tsx diff --git a/components/auth/Input.jsx b/components/auth/Input.tsx similarity index 100% rename from components/auth/Input.jsx rename to components/auth/Input.tsx diff --git a/components/auth/SocialButton.jsx b/components/auth/SocialButton.tsx similarity index 100% rename from components/auth/SocialButton.jsx rename to components/auth/SocialButton.tsx diff --git a/components/auth/index.jsx b/components/auth/index.tsx similarity index 100% rename from components/auth/index.jsx rename to components/auth/index.tsx diff --git a/components/class/Assignment.jsx b/components/class/Assignment.tsx similarity index 100% rename from components/class/Assignment.jsx rename to components/class/Assignment.tsx diff --git a/components/class/Class.jsx b/components/class/Class.tsx similarity index 100% rename from components/class/Class.jsx rename to components/class/Class.tsx diff --git a/components/class/ClassCard.jsx b/components/class/ClassCard.tsx similarity index 100% rename from components/class/ClassCard.jsx rename to components/class/ClassCard.tsx diff --git a/components/class/ColorPicker.jsx b/components/class/ColorPicker.tsx similarity index 100% rename from components/class/ColorPicker.jsx rename to components/class/ColorPicker.tsx diff --git a/components/class/SatisfactionRangesModal.jsx b/components/class/SatisfactionRangesModal.tsx similarity index 100% rename from components/class/SatisfactionRangesModal.jsx rename to components/class/SatisfactionRangesModal.tsx diff --git a/components/class/SemesterModal.jsx b/components/class/SemesterModal.tsx similarity index 100% rename from components/class/SemesterModal.jsx rename to components/class/SemesterModal.tsx diff --git a/components/class/index.js b/components/class/index.ts similarity index 100% rename from components/class/index.js rename to components/class/index.ts diff --git a/components/common/BaseModal.jsx b/components/common/BaseModal.tsx similarity index 100% rename from components/common/BaseModal.jsx rename to components/common/BaseModal.tsx diff --git a/components/common/Button.jsx b/components/common/Button.tsx similarity index 100% rename from components/common/Button.jsx rename to components/common/Button.tsx diff --git a/components/common/ButtonInput.jsx b/components/common/ButtonInput.tsx similarity index 100% rename from components/common/ButtonInput.jsx rename to components/common/ButtonInput.tsx diff --git a/components/common/GradeSelect.jsx b/components/common/GradeSelect.tsx similarity index 100% rename from components/common/GradeSelect.jsx rename to components/common/GradeSelect.tsx diff --git a/components/common/Input.jsx b/components/common/Input.tsx similarity index 100% rename from components/common/Input.jsx rename to components/common/Input.tsx diff --git a/components/common/InputDatePicker.jsx b/components/common/InputDatePicker.tsx similarity index 100% rename from components/common/InputDatePicker.jsx rename to components/common/InputDatePicker.tsx diff --git a/components/common/Loader.jsx b/components/common/Loader.tsx similarity index 100% rename from components/common/Loader.jsx rename to components/common/Loader.tsx diff --git a/components/common/NumberInput.jsx b/components/common/NumberInput.tsx similarity index 100% rename from components/common/NumberInput.jsx rename to components/common/NumberInput.tsx diff --git a/components/common/PageModalHeader.jsx b/components/common/PageModalHeader.tsx similarity index 100% rename from components/common/PageModalHeader.jsx rename to components/common/PageModalHeader.tsx diff --git a/components/common/SelectModal.jsx b/components/common/SelectModal.tsx similarity index 100% rename from components/common/SelectModal.jsx rename to components/common/SelectModal.tsx diff --git a/components/common/Switch.jsx b/components/common/Switch.tsx similarity index 100% rename from components/common/Switch.jsx rename to components/common/Switch.tsx diff --git a/components/common/Text.jsx b/components/common/Text.tsx similarity index 100% rename from components/common/Text.jsx rename to components/common/Text.tsx diff --git a/components/common/TextArea.jsx b/components/common/TextArea.tsx similarity index 100% rename from components/common/TextArea.jsx rename to components/common/TextArea.tsx diff --git a/components/common/index.js b/components/common/index.ts similarity index 100% rename from components/common/index.js rename to components/common/index.ts diff --git a/constants/accentColors.js b/constants/accentColors.ts similarity index 100% rename from constants/accentColors.js rename to constants/accentColors.ts diff --git a/constants/assignmentTypes.js b/constants/assignmentTypes.ts similarity index 100% rename from constants/assignmentTypes.js rename to constants/assignmentTypes.ts diff --git a/constants/satisfactionRanges.js b/constants/satisfactionRanges.ts similarity index 100% rename from constants/satisfactionRanges.js rename to constants/satisfactionRanges.ts diff --git a/constants/semesters.js b/constants/semesters.ts similarity index 100% rename from constants/semesters.js rename to constants/semesters.ts diff --git a/constants/toastConfig.js b/constants/toastConfig.ts similarity index 100% rename from constants/toastConfig.js rename to constants/toastConfig.ts diff --git a/constants/weatherIcons.js b/constants/weatherIcons.ts similarity index 100% rename from constants/weatherIcons.js rename to constants/weatherIcons.ts diff --git a/contexts/index.js b/contexts/index.ts similarity index 100% rename from contexts/index.js rename to contexts/index.ts diff --git a/contexts/supabase.js b/contexts/supabase.tsx similarity index 100% rename from contexts/supabase.js rename to contexts/supabase.tsx diff --git a/contexts/theme.js b/contexts/theme.tsx similarity index 100% rename from contexts/theme.js rename to contexts/theme.tsx diff --git a/hooks/index.js b/hooks/index.ts similarity index 100% rename from hooks/index.js rename to hooks/index.ts diff --git a/hooks/useDateRange.js b/hooks/useDateRange.ts similarity index 100% rename from hooks/useDateRange.js rename to hooks/useDateRange.ts diff --git a/hooks/useInputField.js b/hooks/useInputField.ts similarity index 100% rename from hooks/useInputField.js rename to hooks/useInputField.ts diff --git a/hooks/useWarmUpBrowser.js b/hooks/useWarmUpBrowser.ts similarity index 100% rename from hooks/useWarmUpBrowser.js rename to hooks/useWarmUpBrowser.ts diff --git a/lib/supabase.js b/lib/supabase.ts similarity index 100% rename from lib/supabase.js rename to lib/supabase.ts diff --git a/package.json b/package.json index 311b711..c0882ad 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,10 @@ "yup": "^1.4.0" }, "devDependencies": { - "@babel/core": "^7.20.0" + "@babel/core": "^7.20.0", + "typescript": "^5.3.3", + "@types/react": "~18.2.0", + "@types/react-native": "~0.73.4" }, "private": true } diff --git a/queries/classes.js b/queries/classes.ts similarity index 100% rename from queries/classes.js rename to queries/classes.ts diff --git a/queries/users.js b/queries/users.ts similarity index 100% rename from queries/users.js rename to queries/users.ts diff --git a/tailwind.config.js b/tailwind.config.js index 25c1f70..12028cf 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,10 @@ const { theme } = require("./theme"); /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./app/**/*.{js,jsx}", "./components/**/*.{js,jsx}"], + content: [ + "./app/**/*.{js,jsx,ts,tsx}", + "./components/**/*.{js,jsx,ts,tsx}", + ], presets: [require("nativewind/preset")], theme, plugins: [], diff --git a/jsconfig.json b/tsconfig.json similarity index 62% rename from jsconfig.json rename to tsconfig.json index cd11622..07a880d 100644 --- a/jsconfig.json +++ b/tsconfig.json @@ -1,9 +1,11 @@ { + "extends": "expo/tsconfig.base", "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./*"] }, + "jsxImportSource": "nativewind" }, "exclude": ["node_modules"] -} \ No newline at end of file +} diff --git a/utils/capitalize.js b/utils/capitalize.ts similarity index 100% rename from utils/capitalize.js rename to utils/capitalize.ts diff --git a/utils/formatSatisfactionRange.js b/utils/formatSatisfactionRange.ts similarity index 100% rename from utils/formatSatisfactionRange.js rename to utils/formatSatisfactionRange.ts diff --git a/utils/getRandomAccentColor.js b/utils/getRandomAccentColor.ts similarity index 100% rename from utils/getRandomAccentColor.js rename to utils/getRandomAccentColor.ts diff --git a/utils/getWeatherIcon.js b/utils/getWeatherIcon.ts similarity index 100% rename from utils/getWeatherIcon.js rename to utils/getWeatherIcon.ts diff --git a/utils/index.js b/utils/index.ts similarity index 100% rename from utils/index.js rename to utils/index.ts diff --git a/utils/isValidInput.js b/utils/isValidInput.ts similarity index 100% rename from utils/isValidInput.js rename to utils/isValidInput.ts diff --git a/utils/onSignInWithOauth.js b/utils/onSignInWithOauth.ts similarity index 100% rename from utils/onSignInWithOauth.js rename to utils/onSignInWithOauth.ts diff --git a/utils/pluralize.js b/utils/pluralize.ts similarity index 100% rename from utils/pluralize.js rename to utils/pluralize.ts