Skip to content

Commit

Permalink
Fix Type Alias + Consolidate tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Alder Whiteford authored and Alder Whiteford committed Apr 29, 2024
1 parent e89c5f1 commit 00de46a
Show file tree
Hide file tree
Showing 21 changed files with 430 additions and 573 deletions.
2 changes: 0 additions & 2 deletions frontend/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"test": "echo \"Woah there, we have no frontend tests as of right now. Let's just say we're passing.\" && exit 0"
},
"dependencies": {
"@blocknote/core": "^0.12.4",
"@blocknote/react": "^0.12.4",
"@reduxjs/toolkit": "^2.2.3",
"next": "14.2.3",
"react": "^18",
Expand Down
40 changes: 24 additions & 16 deletions frontend/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"plugins": [
{
"name": "next"
}
],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"strict": false,
"noEmit": true,
"esModuleInterop": true,
"incremental": true,
"module": "esnext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}
6 changes: 3 additions & 3 deletions frontend/lib/api/authApi.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { baseApi } from '../api/base';
import { LoginRequestBody, RefreshTokenRequestBody } from '@/types/auth';
import { User, userSchema } from '@/types/user';
import { LoginRequestBody, RefreshTokenRequestBody } from '../types/';
import { User, userSchema } from '../types/user';
import {
EmailRequestBody,
VerifyEmailRequestBody,
VerifyPasswordResetTokenRequestBody
} from '@/types/verification';
} from '../types/verification';

const AUTH_API_BASE_URL = '/auth';

Expand Down
6 changes: 3 additions & 3 deletions frontend/lib/api/categoryApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
Category,
CreateCategoryRequestBody,
categorySchema
} from '@/types/category';
import { PaginationQueryParams } from '@/types/root';
import { Tag } from '@/types/tag';
} from '../types/category';
import { PaginationQueryParams } from '../types/root';
import { Tag } from '../types/tag';

const CATEGORY_API_BASE_URL = '/categories';

Expand Down
14 changes: 7 additions & 7 deletions frontend/lib/api/clubApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import {
CreateClubTagsRequestBody,
UpdateClubRequestBody,
clubSchema
} from '@/types/club';
} from '../types/club';
import {
Contact,
CreateContactRequestBody,
contactSchema
} from '@/types/contact';
import { Event, eventSchema } from '@/types/event';
} from '../types/contact';
import { Event, eventSchema } from '../types/event';
import {
PointOfContact,
UpdatePointOfContactRequestBody,
pointOfContactSchema
} from '@/types/pointOfContact';
import { PaginationQueryParams } from '@/types/root';
import { Tag, tagSchema } from '@/types/tag';
import { User, userSchema } from '@/types/user';
} from '../types/pointOfContact';
import { PaginationQueryParams } from '../types/root';
import { Tag, tagSchema } from '../types/tag';
import { User, userSchema } from '../types/user';

export const CLUB_API_BASE_URL = '/clubs';

Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/api/contactApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { Contact, contactSchema } from '@/types/contact';
import { PaginationQueryParams } from '@/types/root';
import { Contact, contactSchema } from '../types/contact';
import { PaginationQueryParams } from '../types/root';

const CONTACT_API_BASE_URL = '/contacts';

Expand Down
8 changes: 4 additions & 4 deletions frontend/lib/api/eventApi.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { Club, clubSchema } from '@/types/club';
import { Club, clubSchema } from '../types/club';
import {
CreateEventRequestBody,
Event,
UpdateEventRequestBody,
eventSchema
} from '@/types/event';
import { PaginationQueryParams } from '@/types/root';
import { Tag } from '@/types/tag';
} from '../types/event';
import { PaginationQueryParams } from '../types/root';
import { Tag } from '../types/tag';

const EVENT_API_BASE_URL = '/events';

Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/api/fileApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { File, fileSchema } from '@/types/file';
import { PaginationQueryParams } from '@/types/root';
import { File, fileSchema } from '../types/file';
import { PaginationQueryParams } from '../types/root';

const FILE_API_BASE_URL = '/files';

Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/api/pointOfContactApi.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { PointOfContact, pointOfContactSchema } from '@/types/pointOfContact';
import { PaginationQueryParams } from '@/types/root';
import { PointOfContact, pointOfContactSchema } from '../types/pointOfContact';
import { PaginationQueryParams } from '../types/root';

const POC_API_BASE_URL = '/pocs';

Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/api/tagApi.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { PaginationQueryParams } from '@/types/root';
import { PaginationQueryParams } from '../types/root';
import {
CreateTagRequestBody,
Tag,
UpdateTagRequestBody,
tagSchema
} from '@/types/tag';
} from '../types/tag';

const TAG_API_BASE_URL = '/tags';

Expand Down
10 changes: 5 additions & 5 deletions frontend/lib/api/userApi.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { z } from 'zod';

import { baseApi, handleQueryParams } from '../api/base';
import { UpdatePasswordRequestBody } from '@/types/auth';
import { Club, clubSchema } from '@/types/club';
import { PaginationQueryParams } from '@/types/root';
import { Tag, tagSchema } from '@/types/tag';
import { UpdatePasswordRequestBody } from '../types/auth';
import { Club, clubSchema } from '../types/club';
import { PaginationQueryParams } from '../types/root';
import { Tag, tagSchema } from '../types/tag';
import {
CreateUserRequestBody,
CreateUserTagsRequestBody,
UpdateUserRequestBody,
User,
userSchema
} from '@/types/user';
} from '../types/user';

const USER_API_BASE_URL = '/users';

Expand Down
4 changes: 1 addition & 3 deletions frontend/lib/components/RichTextEditor/BlockNote.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"use client";

import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
import "@blocknote/core/fonts/inter.css";
import "@blocknote/react/style.css";
import "@/src/components/RichTextEditor/styles/BlockNote.styles.css"
import "./styles/BlockNote.styles.css";
import { PartialBlock } from "@blocknote/core";
import { Dispatch, SetStateAction } from "react";
import SuggestionMenu from "./elements/SuggestionMenu";
Expand Down
5 changes: 4 additions & 1 deletion frontend/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
},
"private": true,
"dependencies": {
"@blocknote/core": "^0.12.4",
"@blocknote/react": "^0.12.4",
"@reduxjs/toolkit": "^2.2.3",
"react-icons": "^5.1.0",
"zod": "^3.23.4"
},
"devDependencies": {
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.4"
}
}
}
30 changes: 3 additions & 27 deletions frontend/lib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,16 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"target": "es6",
"plugins": [
{
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": [
"./*"
]
}
},
"include": [
"**/*.ts",
"**/*.tsx",
"types/index.ts"
],
"exclude": [
"node_modules"
]
}
}
38 changes: 0 additions & 38 deletions frontend/lib/yarn.lock

This file was deleted.

8 changes: 4 additions & 4 deletions frontend/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"date-fns": "^3.6.0",
"eslint": "^8.56.0",
"expo": "^50.0.14",
"expo-application": "^5.8.4",
"expo-application": "5.8.3",
"expo-asset": "~9.0.2",
"expo-auth-session": "^5.4.0",
"expo-dev-client": "~3.3.11",
Expand All @@ -43,14 +43,14 @@
"expo-secure-store": "~12.8.1",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-system-ui": "2.9.3",
"expo-web-browser": "~12.8.2",
"install": "^0.13.0",
"nativewind": "^2.0.11",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.51.2",
"react-native": "0.74.0",
"react-native": "0.73.6",
"react-native-calendars": "^1.1304.1",
"react-native-confirmation-code-field": "^7.4.0",
"react-native-element-dropdown": "^2.10.4",
Expand Down Expand Up @@ -84,7 +84,7 @@
"prettier": "^3.2.4",
"react-native-svg-transformer": "^1.3.0",
"react-test-renderer": "18.3.1",
"tailwindcss": "3.4.3",
"tailwindcss": "3.3.2",
"typescript": "^5.4.5"
},
"private": true
Expand Down
37 changes: 15 additions & 22 deletions frontend/mobile/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"module": "commonjs",
"noEmit": true,
"target": "es6",
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true,
"baseUrl": "./",
"paths": {
"@/*": ["./*"]
}
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
}
"extends": ["expo/tsconfig.base", "../tsconfig.json"],
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"module": "esnext",
"target": "es6",
"paths": {
"@/*": ["./*"],
}
},
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
}
Loading

0 comments on commit 00de46a

Please sign in to comment.