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

@@ -2,7 +2,7 @@ interface CESMessage {
/**
* Opens the CES page for the specified instructor
*
* @param data first and last name of the instructor
* @param data - First and last name of the instructor
*/
openCESPage: (data: { instructorFirstName: string; instructorLastName: string }) => chrome.tabs.Tab;
}

View File

@@ -4,17 +4,22 @@
export default interface TabManagementMessages {
/**
* Opens a new tab with the given URL
* @param data The URL to open
*
* @param data - The URL to open
*/
openNewTab: (data: { url: string }) => chrome.tabs.Tab;
/**
* Gets the ID of the current tab (the tab that sent the message)
*
* @returns The ID of the current tab
*/
getTabId: () => number;
/**
* Removes the tab with the given ID
* @param data The ID of the tab to remove
*
* @param data - The ID of the tab to remove
* @returns The ID of the tab that was removed
*/
removeTab: (data: { tabId: number }) => void;

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;
}