Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
FusiDaniel committed Oct 27, 2023
1 parent ae07288 commit f359aba
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 42 deletions.
3 changes: 2 additions & 1 deletion apps/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build:staging": "vue-cli-service build --mode staging",
"test": "vitest run --coverage",
"test:watch": "vitest --coverage",
"lint": "vue-cli-service lint"
"lint": "vue-cli-service lint",
"lint:fix": "vue-cli-service lint --fix"
},
"dependencies": {
"@amcharts/amcharts5": "^5.4.1",
Expand Down
1 change: 1 addition & 0 deletions apps/container/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,6 @@ createApp(App)
.use(VueQueryPlugin, {
queryClient,
})
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.use(HighchartsVue as any)
.mount('#app');
3 changes: 2 additions & 1 deletion apps/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "webpack serve --mode development",
"build": "webpack --mode production",
"lint": "eslint ."
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"devDependencies": {
"@babel/core": "^7.22.9",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"build": "turbo run build",
"dev": "turbo run dev",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"test": "turbo run test"
},
"devDependencies": {
Expand Down
25 changes: 6 additions & 19 deletions packages/services/comments.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { Comment } from 'types';

import api from './api';

type GetCommentResponse = {
Expand All @@ -8,36 +8,23 @@ type GetCommentResponse = {
};

type CreateCommentRequest = {
comment: string,
enrollment: string,
type: string
};

type CommentResponse = {
_id: string;
comment: string;
createdAt: string;
enrollment: { _id: string; };
subject: string;
teacher: string;
updatedAt: string;
}

type CreateCommentResponse = CommentResponse
enrollment: string;
type: string;
};

type UpdateCommentRequest = {
id: string;
comment: string;
};

type UpdateCommentResponse = CommentResponse

export const Comments = {
get: (teacherId: string, subjectId: string, pageParam = 0) =>
api.get<GetCommentResponse>(`/comments/${teacherId}/${subjectId}`, {
params: { page: pageParam, limit: 10 },
}),
getUserComment: (enrollmentId: string) => api.get<Comment>(`/comments/enrollment/${enrollmentId}`),
getUserComment: (enrollmentId: string) =>
api.get<Comment>(`/comments/enrollment/${enrollmentId}`),
create: (data: CreateCommentRequest) => api.post('/comments/', data),
update: ({ id, comment }: UpdateCommentRequest) =>
api.put('/comments/' + id, { comment }),
Expand Down
32 changes: 15 additions & 17 deletions packages/services/enrollments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ import { Concept } from 'types';
import api from './api';

type EnrollmentTeacherComment = {
_id: string,
comment: string,
viewers: number,
enrollment: string,
type: string,
ra: string,
active: boolean,
teacher: string,
subject: string,
updatedAt: string,
createdAt: string,
__v: number
}
_id: string;
comment: string;
viewers: number;
enrollment: string;
type: string;
ra: string;
active: boolean;
teacher: string;
subject: string;
updatedAt: string;
createdAt: string;
__v: number;
};

type EnrollmentTeacher = {
_id: string;
name: string;
updatedAt: string;
createdAt: string;
__v: number;
comment?: EnrollmentTeacherComment
comment?: EnrollmentTeacherComment;
};

export type Subject = {
Expand All @@ -47,12 +47,10 @@ export type Enrollment = {
quad: number;
subject: Subject;
year: number;
comments?: string[]
comments?: string[];
};

export const Enrollments = {
list: () => api.get<Enrollment[]>('/enrollments'),
get: (id: string) => api.get<Enrollment>('/enrollments/' + id),
};


3 changes: 2 additions & 1 deletion packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"main": "./index.ts",
"license": "MIT",
"scripts": {
"lint": "eslint \"**/*.ts\""
"lint": "eslint \"**/*.ts\"",
"lint:fix": "eslint \"**/*.ts\" --fix"
},
"devDependencies": {
"eslint-config-custom": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/services/reviews.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
SearchSubjectItem,
SearchTeacherItem,
SubjectInfo,
TeacherReview,
SearchTeacherItem,
SearchSubjectItem,
} from 'types';

import api from './api';
Expand Down
3 changes: 2 additions & 1 deletion packages/stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"main": "./index.ts",
"license": "MIT",
"scripts": {
"lint": "eslint \"**/*.ts\""
"lint": "eslint \"**/*.ts\"",
"lint:fix": "eslint \"**/*.ts\" --fix"
},
"devDependencies": {
"eslint-config-custom": "*",
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"outputs": ["dist/**"]
},
"lint": {},
"lint:fix": {},
"test": {},
"test:watch": {
"cache": false
Expand Down

0 comments on commit f359aba

Please sign in to comment.