chore: lint-format-docs-tests-bugfixes (#105)
* docs: add jsdoc * feat: change enums to as const objects * chore(test): add themeColors.test.ts * fix: fix tests and bugs with strings.ts util * fix: path alias imports and tsconfig file bug * fix: remove --max-warnings 0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { Calendar } from 'src/views/components/calendar/Calendar/Calendar';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { Calendar } from '@views/components/calendar/Calendar/Calendar';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/Calendar',
|
||||
@@ -8,16 +8,12 @@ const meta = {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
argTypes: {
|
||||
|
||||
},
|
||||
argTypes: {},
|
||||
} satisfies Meta<typeof Calendar>;
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
|
||||
},
|
||||
};
|
||||
args: {},
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { Course, Status } from '@shared/types/Course';
|
||||
import Instructor from '@shared/types/Instructor';
|
||||
import { CalendarBottomBar } from 'src/views/components/calendar/CalendarBottomBar/CalendarBottomBar';
|
||||
import { getCourseColors } from '../../../shared/util/colors';
|
||||
import { getCourseColors } from '@shared/util/colors';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { CalendarBottomBar } from '@views/components/calendar/CalendarBottomBar/CalendarBottomBar';
|
||||
import React from 'react';
|
||||
|
||||
const exampleGovCourse: Course = new Course({
|
||||
courseName: 'Nope',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { Course, Status } from '@shared/types/Course';
|
||||
import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting';
|
||||
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
||||
import Instructor from '@shared/types/Instructor';
|
||||
import CalendarCourse from 'src/views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarCourse from '@views/components/calendar/CalendarCourseBlock/CalendarCourseMeeting';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarCourseMeeting',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Course, Status } from '@shared/types/Course';
|
||||
import { getCourseColors } from '@shared/util/colors';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarCourseCell from 'src/views/components/calendar/CalendarCourseCell/CalendarCourseCell';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarCourseCell from '@views/components/calendar/CalendarCourseCell/CalendarCourseCell';
|
||||
import React from 'react';
|
||||
import { exampleCourse } from '../PopupCourseBlock.stories';
|
||||
|
||||
import { ExampleCourse } from '../PopupCourseBlock.stories';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarCourseCell',
|
||||
@@ -25,10 +26,10 @@ const meta = {
|
||||
</div>
|
||||
),
|
||||
args: {
|
||||
courseDeptAndInstr: exampleCourse.department,
|
||||
className: exampleCourse.number,
|
||||
status: exampleCourse.status,
|
||||
timeAndLocation: exampleCourse.schedule.meetings[0].getTimeString({ separator: '-' }),
|
||||
courseDeptAndInstr: ExampleCourse.department,
|
||||
className: ExampleCourse.number,
|
||||
status: ExampleCourse.status,
|
||||
timeAndLocation: ExampleCourse.schedule.meetings[0].getTimeString({ separator: '-' }),
|
||||
|
||||
colors: getCourseColors('emerald', 500),
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarGrid from 'src/views/components/calendar/CalendarGrid/CalendarGrid';
|
||||
import { getCourseColors } from '@shared/util/colors';
|
||||
import { CalendarGridCourse } from '@views/hooks/useFlattenedCourseSchedule';
|
||||
import { Status } from '@shared/types/Course';
|
||||
import { getCourseColors } from '@shared/util/colors';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarGrid from '@views/components/calendar/CalendarGrid/CalendarGrid';
|
||||
import type { CalendarGridCourse } from '@views/hooks/useFlattenedCourseSchedule';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarGrid',
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Calendar.stories.tsx
|
||||
import React from 'react';
|
||||
import CalendarCell from 'src/views/components/calendar/CalendarGridCell/CalendarGridCell';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarCell from '@views/components/calendar/CalendarGridCell/CalendarGridCell';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarGridCell',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarHeader from 'src/views/components/calendar/CalendarHeader/CalenderHeader';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import CalendarHeader from '@views/components/calendar/CalendarHeader/CalenderHeader';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarHeader',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Course, Status } from '@shared/types/Course';
|
||||
import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting';
|
||||
import { CourseSchedule } from '@shared/types/CourseSchedule';
|
||||
import Instructor from '@shared/types/Instructor';
|
||||
import { UserSchedule } from '@shared/types/UserSchedule';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { CalendarSchedules } from '@views/components/calendar/CalendarSchedules/CalendarSchedules';
|
||||
import React from 'react';
|
||||
import { CourseMeeting, DAY_MAP } from 'src/shared/types/CourseMeeting';
|
||||
import { CourseSchedule } from 'src/shared/types/CourseSchedule';
|
||||
import Instructor from 'src/shared/types/Instructor';
|
||||
import { CalendarSchedules } from 'src/views/components/calendar/CalendarSchedules/CalendarSchedules';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Calendar/CalendarSchedules',
|
||||
|
||||
Reference in New Issue
Block a user