feat: add eslint-plugin-tsdoc (#430)

* feat: add eslint-plugin-tsdoc

* feat(doc): update current jsdoc to tsdoc specification

* chore: update deps

* feat: update warn to error for jsdoc and tsdoc

* chore(doc): lint
This commit is contained in:
doprz
2024-11-16 00:20:36 -06:00
committed by GitHub
parent c41467c617
commit e987fbbe8e
55 changed files with 1439 additions and 1317 deletions

View File

@@ -6,48 +6,61 @@ import type { Course } from '@shared/types/Course';
export interface UserScheduleMessages {
/**
* Add a course to a schedule
* @param data the schedule id and course to add
*
* @param data - The schedule id and course to add
*/
addCourse: (data: { scheduleId: string; course: Course }) => void;
/**
* Adds a course by URL
* @param data
*
* @param data - The URL of the course to add
* @returns Response of the requested course URL
*/
addCourseByURL: (data: { url: string; method: string; body?: string; response: 'json' | 'text' }) => string;
/**
* Remove a course from a schedule
* @param data the schedule id and course to remove
*
* @param data - The schedule id and course to remove
*/
removeCourse: (data: { scheduleId: string; course: Course }) => void;
/**
* Clears all courses from a schedule
* @param data the id of the schedule to clear
*
* @param data - The id of the schedule to clear
*/
clearCourses: (data: { scheduleId: string }) => void;
/**
* Switches the active schedule to the one specified
* @param data the id of the schedule to switch to
*
* @param data - The id of the schedule to switch to
*/
switchSchedule: (data: { scheduleId: string }) => void;
/**
* Creates a new schedule with the specified name
* @param data the name of the schedule to create
* @returns undefined if successful, otherwise an error message
*
* @param data - The name of the schedule to create
* @returns Undefined if successful, otherwise an error message
*/
createSchedule: (data: { scheduleName: string }) => string | undefined;
/**
* Deletes a schedule with the specified name
* @param data the id of the schedule to delete
* @returns undefined if successful, otherwise an error message
*
* @param data - The id of the schedule to delete
* @returns Undefined if successful, otherwise an error message
*/
deleteSchedule: (data: { scheduleId: string }) => string | undefined;
/**
* Renames a schedule with the specified name
* @param data the id of the schedule to rename and the new name
* @returns undefined if successful, otherwise an error message
*
* @param data - The id of the schedule to rename and the new name
* @returns Undefined if successful, otherwise an error message
*/
renameSchedule: (data: { scheduleId: string; newName: string }) => string | undefined;
}