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:
@@ -12,7 +12,7 @@ const SCHEDULE_LIMIT = 10;
|
||||
* If a new schedule can be created without exceeding the limit, the function returns true
|
||||
* Otherwise, display a prompt explaining the limit, and returns false
|
||||
*
|
||||
* @returns a function, () => boolean
|
||||
* @returns a callback function that enforces the schedule limit via a dialog
|
||||
*/
|
||||
export function useEnforceScheduleLimit(): () => boolean {
|
||||
const [, schedules] = useSchedules();
|
||||
|
||||
@@ -48,7 +48,8 @@ export interface FlattenedCourseSchedule {
|
||||
|
||||
/**
|
||||
* Converts minutes to an index value.
|
||||
* @param minutes The number of minutes.
|
||||
*
|
||||
* @param minutes - The number of minutes.
|
||||
* @returns The index value.
|
||||
*/
|
||||
export const convertMinutesToIndex = (minutes: number): number => Math.floor((minutes - 420) / 30);
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useEffect } from 'react';
|
||||
|
||||
/**
|
||||
* Hook to execute a callback when the user scrolls to the bottom of the page
|
||||
* @param callback the function to be called when the user scrolls to the bottom of the page
|
||||
*
|
||||
* @param callback - the function to be called when the user scrolls to the bottom of the page
|
||||
* @returns isLoading boolean to indicate if the callback is currently being executed
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@ import { useEffect } from 'react';
|
||||
|
||||
/**
|
||||
* Hook that calls a callback when a key is pressed
|
||||
* @param key the key to listen for
|
||||
* @param callback the callback to call when the key is pressed
|
||||
*
|
||||
* @param key - the key to listen for
|
||||
* @param callback - the callback to call when the key is pressed
|
||||
*/
|
||||
export function useKeyPress(key: string, callback: (event: KeyboardEvent) => void): void {
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user