diff --git a/src/CourseAuthoringContext.tsx b/src/CourseAuthoringContext.tsx index a31f887155..4bbdd94a11 100644 --- a/src/CourseAuthoringContext.tsx +++ b/src/CourseAuthoringContext.tsx @@ -79,12 +79,12 @@ export const CourseAuthoringProvider = ({ closePublishModal, ] = useToggleWithValue(); /** - * This will hold the state of current item that is being operated on, - * For example: - * - the details of container that is being edited. - * - the details of container of which see more dropdown is open. - * It is mostly used in modals which should be soon be replaced with its equivalent in sidebar. - */ + * This will hold the state of current item that is being operated on, + * For example: + * - the details of container that is being edited. + * - the details of container of which see more dropdown is open. + * It is mostly used in modals which should be soon be replaced with its equivalent in sidebar. + */ const [currentSelection, setCurrentSelection] = useState(); const getUnitUrl = (locator: string) => { @@ -108,8 +108,8 @@ export const CourseAuthoringProvider = ({ } }; /** - * import a unit block from library and redirect user to this unit page. - */ + * import a unit block from library and redirect user to this unit page. + */ const handleAddAndOpenUnit = useCreateCourseBlock(courseId, openUnitPage); const handleAddBlock = useCreateCourseBlock(courseId); diff --git a/src/accessibility-page/AccessibilityBody/AccessibilityBody.tsx b/src/accessibility-page/AccessibilityBody/AccessibilityBody.tsx index 4991a8b387..1277807e08 100644 --- a/src/accessibility-page/AccessibilityBody/AccessibilityBody.tsx +++ b/src/accessibility-page/AccessibilityBody/AccessibilityBody.tsx @@ -7,8 +7,8 @@ const AccessibilityBody = ({ communityAccessibilityLink, email, }: { - communityAccessibilityLink: string, - email: string, + communityAccessibilityLink: string; + email: string; }) => (
diff --git a/src/content-tags-drawer/ContentTagsCollapsible.d.ts b/src/content-tags-drawer/ContentTagsCollapsible.d.ts index 9dfe16c741..e42a575bf5 100644 --- a/src/content-tags-drawer/ContentTagsCollapsible.d.ts +++ b/src/content-tags-drawer/ContentTagsCollapsible.d.ts @@ -18,9 +18,9 @@ export interface TaxonomySelectProps { appliedContentTagsTree: Record; stagedContentTagsTree: Record; checkedTags: string[]; - selectCancelRef: Ref, - selectAddRef: Ref, - selectInlineAddRef: Ref, + selectCancelRef: Ref; + selectAddRef: Ref; + selectInlineAddRef: Ref; handleCommitStagedTags: () => void; handleCancelStagedTags: () => void; handleSelectableBoxChange: React.ChangeEventHandler; @@ -40,12 +40,12 @@ declare module 'react-select/base' { export type TagTree = { [key: string]: { - children: TagTree, - canChangeObjecttag: boolean, - canDeleteObjecttag: boolean, - explicit: boolean, - isCopied: boolean, - } + children: TagTree; + canChangeObjecttag: boolean; + canDeleteObjecttag: boolean; + explicit: boolean; + isCopied: boolean; + }; }; export default ContentTagsCollapsible; diff --git a/src/content-tags-drawer/tags-sidebar-controls/index.tsx b/src/content-tags-drawer/tags-sidebar-controls/index.tsx index c2ecb48553..84f6b17e32 100644 --- a/src/content-tags-drawer/tags-sidebar-controls/index.tsx +++ b/src/content-tags-drawer/tags-sidebar-controls/index.tsx @@ -2,7 +2,7 @@ import TagsSidebarHeader from './TagsSidebarHeader'; import TagsSidebarBody from './TagsSidebarBody'; interface TagsSidebarControlsProps { - readOnly: boolean, + readOnly: boolean; } const TagsSidebarControls = ({ readOnly }: TagsSidebarControlsProps) => ( diff --git a/src/course-libraries/OutOfSyncAlert.tsx b/src/course-libraries/OutOfSyncAlert.tsx index 5a365a2737..5103284f1f 100644 --- a/src/course-libraries/OutOfSyncAlert.tsx +++ b/src/course-libraries/OutOfSyncAlert.tsx @@ -7,23 +7,23 @@ import { useEntityLinksSummaryByDownstreamContext } from './data/apiHooks'; import messages from './messages'; interface OutOfSyncAlertProps { - showAlert: boolean, - setShowAlert: React.Dispatch>, - courseId: string, + showAlert: boolean; + setShowAlert: React.Dispatch>; + courseId: string; onDismiss?: () => void; onReview: () => void; } /** -* Shows an alert when library components used in the current course were updated and the blocks -* in course can be updated. Following are the conditions for displaying the alert. -* -* * The alert is displayed if components are out of sync. -* * If the user clicks on dismiss button, the state of dismiss is stored in localstorage of user -* in this format: outOfSyncCountAlert-${courseId} = . -* * If there are not new published components for the course and the user opens outline -* in the same browser, they don't see the alert again. -* * If there is a new published component upstream, the alert is displayed again. -*/ + * Shows an alert when library components used in the current course were updated and the blocks + * in course can be updated. Following are the conditions for displaying the alert. + * + * * The alert is displayed if components are out of sync. + * * If the user clicks on dismiss button, the state of dismiss is stored in localstorage of user + * in this format: outOfSyncCountAlert-${courseId} = . + * * If there are not new published components for the course and the user opens outline + * in the same browser, they don't see the alert again. + * * If there is a new published component upstream, the alert is displayed again. + */ export const OutOfSyncAlert: React.FC = ({ showAlert, setShowAlert, diff --git a/src/course-libraries/__mocks__/publishableEntityLinks.json b/src/course-libraries/__mocks__/publishableEntityLinks.json index 6af348d67d..dc3254f01b 100644 --- a/src/course-libraries/__mocks__/publishableEntityLinks.json +++ b/src/course-libraries/__mocks__/publishableEntityLinks.json @@ -79,7 +79,7 @@ "created": "2025-02-08T14:07:05.588484Z", "updated": "2025-02-08T14:07:05.588484Z" }, - { + { "id": 891, "upstreamContextTitle": "CS problems 3", "upstreamVersion": 17, diff --git a/src/course-libraries/data/api.mocks.ts b/src/course-libraries/data/api.mocks.ts index 588886d10c..cde9d6c9e4 100644 --- a/src/course-libraries/data/api.mocks.ts +++ b/src/course-libraries/data/api.mocks.ts @@ -109,7 +109,7 @@ mockUseLibBlockMetadata.applyMock = () => { /** * Mock getCourseReadyToMigrateLegacyLibContentBlocks -*/ + */ export async function mockGetReadyToUpdateReferences( courseId?: string, ): ReturnType { @@ -139,7 +139,7 @@ mockGetReadyToUpdateReferences.applyMock = () => { /** * Mock getCourseLegacyLibRefUpdateTaskStatus -*/ + */ export async function mockGetCourseLegacyLibRefUpdateTaskStatus( _courseId?: string, taskId?: string, @@ -176,7 +176,7 @@ mockGetCourseLegacyLibRefUpdateTaskStatus.applyMock = () => { /** * Mock getCourseReadyToMigrateLegacyLibContentBlocks -*/ + */ export async function mockMigrateCourseReadyToMigrateLegacyLibContentBlocks( courseId?: string, ): ReturnType { diff --git a/src/course-libraries/data/api.ts b/src/course-libraries/data/api.ts index 5806ec47e3..c492c6b933 100644 --- a/src/course-libraries/data/api.ts +++ b/src/course-libraries/data/api.ts @@ -17,7 +17,7 @@ export interface PaginatedData { count: number; numPages: number; currentPage: number; - results: T, + results: T; } export interface BasePublishableEntityLink { diff --git a/src/course-libraries/data/apiHooks.ts b/src/course-libraries/data/apiHooks.ts index 51264cf14b..ce863c1906 100644 --- a/src/course-libraries/data/apiHooks.ts +++ b/src/course-libraries/data/apiHooks.ts @@ -54,11 +54,11 @@ export const courseLibrariesQueryKeys = { export const useEntityLinks = ({ courseId, readyToSync, useTopLevelParents, upstreamKey, contentType, }: { - courseId?: string, - readyToSync?: boolean, - useTopLevelParents?: boolean, - upstreamKey?: string, - contentType?: 'all' | 'components' | 'containers', + courseId?: string; + readyToSync?: boolean; + useTopLevelParents?: boolean; + upstreamKey?: string; + contentType?: 'all' | 'components' | 'containers'; }) => ( useQuery({ queryKey: courseLibrariesQueryKeys.courseReadyToSyncLibraries({ diff --git a/src/course-outline/OutlineAddChildButtons.tsx b/src/course-outline/OutlineAddChildButtons.tsx index 562c489cba..803a2b6a9e 100644 --- a/src/course-outline/OutlineAddChildButtons.tsx +++ b/src/course-outline/OutlineAddChildButtons.tsx @@ -165,8 +165,8 @@ const NewOutlineAddChildButtons = ({ } /** - * Starts add flow in sidebar when `Use content from library` button is clicked. - */ + * Starts add flow in sidebar when `Use content from library` button is clicked. + */ const onUseLibraryContent = useCallback(async () => { startCurrentFlow({ flowType, diff --git a/src/course-outline/card-header/CardHeader.scss b/src/course-outline/card-header/CardHeader.scss index ffa8712a7c..6c4d9311d5 100644 --- a/src/course-outline/card-header/CardHeader.scss +++ b/src/course-outline/card-header/CardHeader.scss @@ -11,15 +11,15 @@ background: transparent; color: var(--pgn-color-black); - .truncate-1-line { - -webkit-line-clamp: 1; /* stylelint-disable-line value-no-vendor-prefix */ - line-clamp: 1; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ - min-width: 100px; - -webkit-box-orient: vertical; /* stylelint-disable-line value-no-vendor-prefix */ - } + .truncate-1-line { + -webkit-line-clamp: 1; /* stylelint-disable-line value-no-vendor-prefix */ + line-clamp: 1; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ + min-width: 100px; + -webkit-box-orient: vertical; /* stylelint-disable-line value-no-vendor-prefix */ + } } .item-card-button-icon { diff --git a/src/course-outline/card-header/CardHeader.tsx b/src/course-outline/card-header/CardHeader.tsx index f85a1ac3ee..d9e5b02ddd 100644 --- a/src/course-outline/card-header/CardHeader.tsx +++ b/src/course-outline/card-header/CardHeader.tsx @@ -36,7 +36,7 @@ import { useOutlineSidebarContext } from '../outline-sidebar/OutlineSidebarConte interface CardHeaderProps { title: string; status: string; - cardId: string, + cardId: string; hasChanges: boolean; onClickPublish: () => void; onClickConfigure: () => void; @@ -51,8 +51,8 @@ interface CardHeaderProps { onClickManageTags?: () => void; titleComponent: ReactNode; namePrefix: string; - proctoringExamConfigurationLink?: string, - actions: XBlockActions, + proctoringExamConfigurationLink?: string; + actions: XBlockActions; enableCopyPasteUnits?: boolean; isVertical?: boolean; isSequential?: boolean; @@ -64,10 +64,10 @@ interface CardHeaderProps { parentInfo?: { graded: boolean; isTimeLimited?: boolean; - }, + }; // An optional component that is rendered before the dropdown. This is used by the Subsection // and Unit card components to render their plugin slots. - extraActionsComponent?: ReactNode, + extraActionsComponent?: ReactNode; onClickSync?: () => void; readyToSync?: boolean; } diff --git a/src/course-outline/data/api.ts b/src/course-outline/data/api.ts index b8aebc718a..cba3b89d37 100644 --- a/src/course-outline/data/api.ts +++ b/src/course-outline/data/api.ts @@ -24,9 +24,9 @@ export const getCourseBestPracticesApiUrl = ({ excludeGraded, all, }: { - courseId: string, - excludeGraded: boolean, - all: boolean, + courseId: string; + excludeGraded: boolean; + all: boolean; }) => `${getApiBaseUrl()}/api/courses/v1/quality/${courseId}/?exclude_graded=${excludeGraded}&all=${all}`; export const getCourseLaunchApiUrl = ({ @@ -34,10 +34,10 @@ export const getCourseLaunchApiUrl = ({ gradedOnly, validateOras, all, -}:{ - courseId: string, - gradedOnly: boolean, - validateOras: boolean, +}: { + courseId: string; + gradedOnly: boolean; + validateOras: boolean; all: boolean, }) => `${getApiBaseUrl()}/api/courses/v1/validation/${courseId}/?graded_only=${gradedOnly}&validate_oras=${validateOras}&all=${all}`; @@ -329,15 +329,15 @@ export async function duplicateCourseItem(itemId: string, parentId: string): Pro } export type CreateCourseXBlockType = { - type: string, + type: string; /** The category of the XBlock. Defaults to the type if not provided. */ - category?: string, - parentLocator: string, - displayName?: string, - boilerplate?: string, - stagedContent?: string, + category?: string; + parentLocator: string; + displayName?: string; + boilerplate?: string; + stagedContent?: string; /** component key from library if being imported. */ - libraryContentKey?: string, + libraryContentKey?: string; }; /** @@ -374,7 +374,7 @@ export async function createCourseXblock({ * @param {string} courseId * @param {Array} children list of sections id's * @returns {Promise} -*/ + */ export async function setSectionOrderList(courseId: string, children: Array): Promise { const { data } = await getAuthenticatedHttpClient() .put(getCourseBlockApiUrl(courseId), { @@ -389,7 +389,7 @@ export async function setSectionOrderList(courseId: string, children: Array} children list of sections id's * @returns {Promise} -*/ + */ export async function setCourseItemOrderList(itemId: string, children: Array): Promise { const { data } = await getAuthenticatedHttpClient() .put(getCourseItemApiUrl(itemId), { @@ -404,7 +404,7 @@ export async function setCourseItemOrderList(itemId: string, children: Array} -*/ + */ export async function setVideoSharingOption( courseId: string, videoSharingOption: string, @@ -423,7 +423,7 @@ export async function setVideoSharingOption( * Paste block to clipboard * @param {string} parentLocator * @returns {Promise} -*/ + */ export async function pasteBlock(parentLocator: string): Promise<{ locator: string; courseKey: string; @@ -443,7 +443,7 @@ export async function pasteBlock(parentLocator: string): Promise<{ * Dismiss notification * @param {string} url * @returns void -*/ + */ export async function dismissNotification(url: string) { await getAuthenticatedHttpClient() .delete(url); diff --git a/src/course-outline/data/types.ts b/src/course-outline/data/types.ts index 4e927216dc..031ffb4ad7 100644 --- a/src/course-outline/data/types.ts +++ b/src/course-outline/data/types.ts @@ -1,13 +1,13 @@ import { XBlock, XBlockActions } from '@src/data/types'; export interface CourseStructure { - highlightsEnabledForMessaging: boolean, - videoSharingEnabled: boolean, - videoSharingOptions: string, - start: string, - end: string, - actions: XBlockActions, - hasChanges: boolean, + highlightsEnabledForMessaging: boolean; + videoSharingEnabled: boolean; + videoSharingOptions: string; + start: string; + end: string; + actions: XBlockActions; + hasChanges: boolean; } export interface CourseOutline { @@ -87,44 +87,44 @@ export interface CourseItemUpdateResult { upstreamDisplayName?: string; upstreamVersion?: number; displayName?: string; - } + }; } export interface ConfigureSectionData { - sectionId: string, - isVisibleToStaffOnly: boolean, - startDatetime: string, + sectionId: string; + isVisibleToStaffOnly: boolean; + startDatetime: string; } export interface ConfigureSubsectionData { - itemId: string, - isVisibleToStaffOnly: boolean, - releaseDate: string, - graderType: string, - dueDate: string, - isTimeLimited: boolean, - isProctoredExam: boolean, - isOnboardingExam: boolean, - isPracticeExam: boolean, - examReviewRules: string, - defaultTimeLimitMin: number, - hideAfterDue: string, - showCorrectness: string, - isPrereq: boolean, - prereqUsageKey: string, - prereqMinScore: number, - prereqMinCompletion: number, + itemId: string; + isVisibleToStaffOnly: boolean; + releaseDate: string; + graderType: string; + dueDate: string; + isTimeLimited: boolean; + isProctoredExam: boolean; + isOnboardingExam: boolean; + isPracticeExam: boolean; + examReviewRules: string; + defaultTimeLimitMin: number; + hideAfterDue: string; + showCorrectness: string; + isPrereq: boolean; + prereqUsageKey: string; + prereqMinScore: number; + prereqMinCompletion: number; } export interface ConfigureUnitData { - unitId: string, - isVisibleToStaffOnly: boolean, - groupAccess: object, - discussionEnabled: boolean, + unitId: string; + isVisibleToStaffOnly: boolean; + groupAccess: object; + discussionEnabled: boolean; } export type StaticFileNotices = { - conflictingFiles: string[], - errorFiles: string[], - newFiles: string[], + conflictingFiles: string[]; + errorFiles: string[]; + newFiles: string[]; }; diff --git a/src/course-outline/drag-helper/SortableItem.tsx b/src/course-outline/drag-helper/SortableItem.tsx index d51f71e690..acc1386837 100644 --- a/src/course-outline/drag-helper/SortableItem.tsx +++ b/src/course-outline/drag-helper/SortableItem.tsx @@ -16,7 +16,7 @@ interface SortableItemProps { childAddable?: boolean; displayName: string; status: string; - } + }; isDroppable?: boolean; isDraggable?: boolean; children: React.ReactNode; diff --git a/src/course-outline/drag-helper/utils.ts b/src/course-outline/drag-helper/utils.ts index 40a41f1e9d..23a90c1fde 100644 --- a/src/course-outline/drag-helper/utils.ts +++ b/src/course-outline/drag-helper/utils.ts @@ -37,10 +37,10 @@ export const dragHelpers = { }; /** - * This function moves a subsection from one section to another in the copy of blocks. - * It updates the copy with the new positions for the sections and their subsections, - * while keeping other sections intact. -*/ + * This function moves a subsection from one section to another in the copy of blocks. + * It updates the copy with the new positions for the sections and their subsections, + * while keeping other sections intact. + */ export const moveSubsectionOver = ( prevCopy: XBlock[], activeSectionIdx: number, @@ -107,8 +107,8 @@ export const moveUnitOver = ( }; /** - * Handles dragging and dropping a subsection within the same section. -*/ + * Handles dragging and dropping a subsection within the same section. + */ export const moveSubsection = ( prevCopy: XBlock[], sectionIdx: number, @@ -162,10 +162,10 @@ export const canMoveSection = (sections: XBlock[]) => (id: number, step: number) }; /** - * Checks if a user can move a specific subsection within its parent section or other sections. - * It ensures that the new position for the subsection is valid and that it's not - * attempting to drag an unmovable item or beyond the bounds of existing sections. -*/ + * Checks if a user can move a specific subsection within its parent section or other sections. + * It ensures that the new position for the subsection is valid and that it's not + * attempting to drag an unmovable item or beyond the bounds of existing sections. + */ export const possibleSubsectionMoves = ( sections: XBlock[], sectionIndex: number, @@ -229,9 +229,9 @@ export const possibleSubsectionMoves = ( }; /** - * Function to find the valid subsection index based on the current position and the step. - * It uses the provided find method. -*/ + * Function to find the valid subsection index based on the current position and the step. + * It uses the provided find method. + */ const findValidSubsectionIndex = ( sections: XBlock[], sectionIndex: number, @@ -239,7 +239,7 @@ const findValidSubsectionIndex = ( findMethod: typeof findLastIndex | typeof findIndex, ): { newSectionIndex: number; - newSubsectionIndex: number + newSubsectionIndex: number; } | null => { if (sectionIndex + step < 0) { return null; @@ -268,7 +268,7 @@ const findValidSubsectionIndex = ( * Moves a unit to a previous location within the XBlock structure. This function attempts to move the unit * to the previous subsection within the same section, and if that fails, it will attempt to move it to the * previous section. -*/ + */ const moveToPreviousLocation = ( sections: XBlock[], sectionIndex: number, @@ -331,7 +331,7 @@ const moveToPreviousLocation = ( /** * This function attempts to move a unit to the next childAddable subsection within the current section. * If no such subsection exists, it will attempt to move the unit to the next section. -*/ + */ const moveToNextLocation = ( sections: XBlock[], sectionIndex: number, @@ -391,10 +391,10 @@ const moveToNextLocation = ( }; /** - * Checks if a user can move a specific unit within all subsections - * It ensures that the new position for the unit is valid and that it's not - * attempting to drag an unmovable item or beyond the bounds of existing subsections and sections. -*/ + * Checks if a user can move a specific unit within all subsections + * It ensures that the new position for the unit is valid and that it's not + * attempting to drag an unmovable item or beyond the bounds of existing subsections and sections. + */ export const possibleUnitMoves = ( sections: XBlock[], sectionIndex: number, diff --git a/src/course-outline/header-navigations/HeaderActions.tsx b/src/course-outline/header-navigations/HeaderActions.tsx index 5406c96b15..81161b07ba 100644 --- a/src/course-outline/header-navigations/HeaderActions.tsx +++ b/src/course-outline/header-navigations/HeaderActions.tsx @@ -14,10 +14,10 @@ import messages from './messages'; export interface HeaderActionsProps { actions: { - lmsLink: string, - }, - courseActions: XBlockActions, - errors?: OutlinePageErrors, + lmsLink: string; + }; + courseActions: XBlockActions; + errors?: OutlinePageErrors; } const HeaderActions = ({ diff --git a/src/course-outline/header-navigations/HeaderNavigations.tsx b/src/course-outline/header-navigations/HeaderNavigations.tsx index 90c98038d7..122c4c6a6e 100644 --- a/src/course-outline/header-navigations/HeaderNavigations.tsx +++ b/src/course-outline/header-navigations/HeaderNavigations.tsx @@ -11,18 +11,18 @@ import { OutlinePageErrors, XBlockActions } from '@src/data/types'; import messages from './messages'; export interface HeaderNavigationsProps { - isReIndexShow: boolean, - isSectionsExpanded: boolean, - isDisabledReindexButton: boolean, + isReIndexShow: boolean; + isSectionsExpanded: boolean; + isDisabledReindexButton: boolean; headerNavigationsActions: { - handleNewSection: () => void, - handleReIndex: () => void, - handleExpandAll: () => void, - lmsLink: string, - }, - hasSections: boolean, - courseActions: XBlockActions, - errors?: OutlinePageErrors, + handleNewSection: () => void; + handleReIndex: () => void; + handleExpandAll: () => void; + lmsLink: string; + }; + hasSections: boolean; + courseActions: XBlockActions; + errors?: OutlinePageErrors; } const HeaderNavigations = ({ diff --git a/src/course-outline/outline-sidebar/AddSidebar.tsx b/src/course-outline/outline-sidebar/AddSidebar.tsx index 8915d5da98..e08ebc7e1e 100644 --- a/src/course-outline/outline-sidebar/AddSidebar.tsx +++ b/src/course-outline/outline-sidebar/AddSidebar.tsx @@ -42,8 +42,8 @@ const CannotAddContentAlert = () => { }; type AddContentButtonProps = { - name: string, - blockType: ContainerType, + name: string; + blockType: ContainerType; }; /** Add Content Button */ diff --git a/src/course-outline/outline-sidebar/OutlineSidebarContext.tsx b/src/course-outline/outline-sidebar/OutlineSidebarContext.tsx index c93cdfa896..a181269f38 100644 --- a/src/course-outline/outline-sidebar/OutlineSidebarContext.tsx +++ b/src/course-outline/outline-sidebar/OutlineSidebarContext.tsx @@ -90,22 +90,22 @@ export const OutlineSidebarProvider = ({ children }: { children?: React.ReactNod const [isOpen, open, , toggle] = useToggle(true); /** - * Use this to store the selected container's information and should always contain full ancestor info. - * If selected container is a section, set containerId and sectionId to same value and subsectionId should - * be undefined. - * If selected container is a subsection, set containerId and subsectionId to same value and sectionId - * should be set to its parent section id. - * If selected container is an unit, set containerId as unitId, subsectionId as its parent subsection's id - * and sectionId should be set to its top parent section's id. - */ + * Use this to store the selected container's information and should always contain full ancestor info. + * If selected container is a section, set containerId and sectionId to same value and subsectionId should + * be undefined. + * If selected container is a subsection, set containerId and subsectionId to same value and sectionId + * should be set to its parent section id. + * If selected container is an unit, set containerId as unitId, subsectionId as its parent subsection's id + * and sectionId should be set to its top parent section's id. + */ const [selectedContainerState, setSelectedContainerState] = useState(); const { setCurrentSelection } = useCourseAuthoringContext(); /** - * Set currentSelection to same as selectedContainerState whenever - * selectedContainerState or currentPageKey changes. - * This allows us to reset the currentSelection. - */ + * Set currentSelection to same as selectedContainerState whenever + * selectedContainerState or currentPageKey changes. + * This allows us to reset the currentSelection. + */ useEffect(() => { // To allow tag buttons on other cards to jump to align page and not loose its selection if (currentPageKey !== 'align') { @@ -135,10 +135,10 @@ export const OutlineSidebarProvider = ({ children }: { children?: React.ReactNod }, [selectedContainerState]); /** - * Starts add content flow. - * The sidebar enters an add content flow which allows user to add content in a specific container. - * A placeholder container is added in the location when the flow is started. - */ + * Starts add content flow. + * The sidebar enters an add content flow which allows user to add content in a specific container. + * A placeholder container is added in the location when the flow is started. + */ const startCurrentFlow = useCallback((flow: OutlineFlow) => { setCurrentPageKey('add'); setCurrentFlow(flow); diff --git a/src/course-outline/section-card/SectionCard.tsx b/src/course-outline/section-card/SectionCard.tsx index fac67b8174..0fbfb47748 100644 --- a/src/course-outline/section-card/SectionCard.tsx +++ b/src/course-outline/section-card/SectionCard.tsx @@ -28,18 +28,18 @@ import { handleResponseErrors } from '@src/generic/saving-error-alert'; import messages from './messages'; interface SectionCardProps { - section: XBlock, - isSelfPaced: boolean, - isCustomRelativeDatesActive: boolean, - children: ReactNode, - onOpenHighlightsModal: (section: XBlock) => void, - onOpenConfigureModal: () => void, - onOpenDeleteModal: () => void, - onDuplicateSubmit: () => void, - isSectionsExpanded: boolean, - index: number, - canMoveItem: (oldIndex: number, newIndex: number) => boolean, - onOrderChange: (oldIndex: number, newIndex: number) => void, + section: XBlock; + isSelfPaced: boolean; + isCustomRelativeDatesActive: boolean; + children: ReactNode; + onOpenHighlightsModal: (section: XBlock) => void; + onOpenConfigureModal: () => void; + onOpenDeleteModal: () => void; + onDuplicateSubmit: () => void; + isSectionsExpanded: boolean; + index: number; + canMoveItem: (oldIndex: number, newIndex: number) => boolean; + onOrderChange: (oldIndex: number, newIndex: number) => void; } const SectionCard = ({ diff --git a/src/course-outline/status-bar/LegacyStatusBar.tsx b/src/course-outline/status-bar/LegacyStatusBar.tsx index 5eb5449d14..38d4b5c310 100644 --- a/src/course-outline/status-bar/LegacyStatusBar.tsx +++ b/src/course-outline/status-bar/LegacyStatusBar.tsx @@ -18,8 +18,8 @@ import { getVideoSharingOptionText } from '@src/course-outline/utils'; import messages from './messages'; interface StatusBarItemProps { - title: string, - children: ReactNode, + title: string; + children: ReactNode; } const StatusBarItem = ({ title, children }: StatusBarItemProps) => ( @@ -32,11 +32,11 @@ const StatusBarItem = ({ title, children }: StatusBarItemProps) => ( ); export interface LegacyStatusBarProps { - courseId: string, - isLoading: boolean, - openEnableHighlightsModal: () => void, - handleVideoSharingOptionChange: (value: string) => void, - statusBarData: CourseOutlineStatusBar, + courseId: string; + isLoading: boolean; + openEnableHighlightsModal: () => void; + handleVideoSharingOptionChange: (value: string) => void; + statusBarData: CourseOutlineStatusBar; } export const LegacyStatusBar = ({ diff --git a/src/course-outline/status-bar/hooks.ts b/src/course-outline/status-bar/hooks.ts index 833f2f9b6d..a78ebc8051 100644 --- a/src/course-outline/status-bar/hooks.ts +++ b/src/course-outline/status-bar/hooks.ts @@ -5,8 +5,8 @@ export interface HookType { notificationAppData: { tabsCount?: { count?: number; - } - } + }; + }; } // Load the hook module asynchronously diff --git a/src/course-outline/subsection-card/SubsectionCard.tsx b/src/course-outline/subsection-card/SubsectionCard.tsx index c782d05a80..1607595b9f 100644 --- a/src/course-outline/subsection-card/SubsectionCard.tsx +++ b/src/course-outline/subsection-card/SubsectionCard.tsx @@ -30,23 +30,19 @@ import { handleResponseErrors } from '@src/generic/saving-error-alert'; import messages from './messages'; interface SubsectionCardProps { - section: XBlock, - subsection: XBlock, - children: ReactNode - isSectionsExpanded: boolean, - isSelfPaced: boolean, - isCustomRelativeDatesActive: boolean, - onOpenDeleteModal: () => void, - onDuplicateSubmit: () => void, - index: number, - getPossibleMoves: (index: number, step: number) => void, - onOrderChange: (section: XBlock, moveDetails: any) => void, - onOpenConfigureModal: () => void, - onPasteClick: ( - parentLocator: string, - subsectionId: string, - sectionId: string - ) => void, + section: XBlock; + subsection: XBlock; + children: ReactNode; + isSectionsExpanded: boolean; + isSelfPaced: boolean; + isCustomRelativeDatesActive: boolean; + onOpenDeleteModal: () => void; + onDuplicateSubmit: () => void; + index: number; + getPossibleMoves: (index: number, step: number) => void; + onOrderChange: (section: XBlock, moveDetails: any) => void; + onOpenConfigureModal: () => void; + onPasteClick: (parentLocator: string, subsectionId: string, sectionId: string) => void; } const SubsectionCard = ({ diff --git a/src/course-outline/unit-card/UnitCard.tsx b/src/course-outline/unit-card/UnitCard.tsx index 11be7bcc4e..6c0a4ffb98 100644 --- a/src/course-outline/unit-card/UnitCard.tsx +++ b/src/course-outline/unit-card/UnitCard.tsx @@ -35,8 +35,8 @@ interface UnitCardProps { onOpenDeleteModal: () => void; onDuplicateSubmit: () => void; index: number; - getPossibleMoves: (index: number, step: number) => void, - onOrderChange: (section: XBlock, moveDetails: any) => void, + getPossibleMoves: (index: number, step: number) => void; + onOrderChange: (section: XBlock, moveDetails: any) => void; isSelfPaced: boolean; isCustomRelativeDatesActive: boolean; discussionsSettings: { diff --git a/src/course-outline/xblock-status/StatusMessages.tsx b/src/course-outline/xblock-status/StatusMessages.tsx index 547cc84413..f9054cd290 100644 --- a/src/course-outline/xblock-status/StatusMessages.tsx +++ b/src/course-outline/xblock-status/StatusMessages.tsx @@ -11,11 +11,11 @@ import messages from './messages'; interface StatusMessagesProps { isVertical: boolean; - staffOnlyMessage?: boolean, - prereq?: string, - prereqs?: XBlockPrereqs[], - userPartitionInfo?: UserPartitionInfoTypes, - hasPartitionGroupComponents?: boolean, + staffOnlyMessage?: boolean; + prereq?: string; + prereqs?: XBlockPrereqs[]; + userPartitionInfo?: UserPartitionInfoTypes; + hasPartitionGroupComponents?: boolean; } interface StatusMessagesText { diff --git a/src/course-unit/CourseUnit.tsx b/src/course-unit/CourseUnit.tsx index 192679ab3d..0c0c5d22bd 100644 --- a/src/course-unit/CourseUnit.tsx +++ b/src/course-unit/CourseUnit.tsx @@ -66,10 +66,10 @@ const StatusBar = ({ courseUnit }: { courseUnit: any }) => { text: messages.statusBarDraftNeverPublished, icon: DraftIcon, } as { - variant: string, - className?: string, - text: MessageDescriptor, - icon: React.ComponentType, + variant: string; + className?: string; + text: MessageDescriptor; + icon: React.ComponentType; }; if (courseUnit.currentlyVisibleToStudents) { diff --git a/src/course-unit/add-component/AddComponent.tsx b/src/course-unit/add-component/AddComponent.tsx index 89d3dfbf04..75b63bfab1 100644 --- a/src/course-unit/add-component/AddComponent.tsx +++ b/src/course-unit/add-component/AddComponent.tsx @@ -23,37 +23,37 @@ import ComponentModalView from './add-component-modals/ComponentModalView'; import { getCourseSectionVertical, getCourseUnitData } from '../data/selectors'; type ComponentTemplateData = { - displayName: string, - category?: string, - type: string, - beta?: boolean, + displayName: string; + category?: string; + type: string; + beta?: boolean; templates: Array<{ - boilerplateName?: string, - category?: string, - displayName: string, - supportLevel?: string | boolean, - }>, + boilerplateName?: string; + category?: string; + displayName: string; + supportLevel?: string | boolean; + }>; supportLegend: { - allowUnsupportedXblocks?: boolean, - documentationLabel?: string, - showLegend?: boolean, - }, + allowUnsupportedXblocks?: boolean; + documentationLabel?: string; + showLegend?: boolean; + }; }; export interface AddComponentProps { - isSplitTestType?: boolean, - isUnitVerticalType?: boolean, - parentLocator: string, + isSplitTestType?: boolean; + isUnitVerticalType?: boolean; + parentLocator: string; handleCreateNewCourseXBlock: ( args: object, - callback?: (args: { courseKey: string, locator: string }) => void - ) => void, - isProblemBankType?: boolean, + callback?: (args: { courseKey: string; locator: string }) => void, + ) => void; + isProblemBankType?: boolean; addComponentTemplateData?: { - blockId: string, - parentLocator?: string, - model: ComponentTemplateData, - }, + blockId: string; + parentLocator?: string; + model: ComponentTemplateData; + }; } const AddComponent = ({ @@ -200,7 +200,7 @@ const AddComponent = ({
    {componentTemplates.map((component: ComponentTemplateData) => { const { type, displayName, beta } = component; - let modalParams: { open: () => void, close: () => void, isOpen: boolean }; + let modalParams: { open: () => void; close: () => void; isOpen: boolean }; if (!component.templates.length) { return null; diff --git a/src/course-unit/data/types.ts b/src/course-unit/data/types.ts index 6624dac893..a2ea541623 100644 --- a/src/course-unit/data/types.ts +++ b/src/course-unit/data/types.ts @@ -27,7 +27,7 @@ export interface CourseOutlineData { category: string; displayName: string; children: XBlock[]; - } + }; } export interface ContainerChildData { diff --git a/src/course-unit/legacy-sidebar/components/sidebar-footer/ActionButtons.tsx b/src/course-unit/legacy-sidebar/components/sidebar-footer/ActionButtons.tsx index 82572b5d89..c86636d577 100644 --- a/src/course-unit/legacy-sidebar/components/sidebar-footer/ActionButtons.tsx +++ b/src/course-unit/legacy-sidebar/components/sidebar-footer/ActionButtons.tsx @@ -8,9 +8,9 @@ import { useClipboard } from '@src/generic/clipboard'; import messages from '../../messages'; interface ActionButtonsProps { - openDiscardModal: () => void, - handlePublishing: () => void, - hideCopyButton?: boolean, + openDiscardModal: () => void; + handlePublishing: () => void; + hideCopyButton?: boolean; } const ActionButtons = ({ diff --git a/src/course-unit/legacy-sidebar/components/sidebar-footer/index.tsx b/src/course-unit/legacy-sidebar/components/sidebar-footer/index.tsx index 88c601c436..50e53614e6 100644 --- a/src/course-unit/legacy-sidebar/components/sidebar-footer/index.tsx +++ b/src/course-unit/legacy-sidebar/components/sidebar-footer/index.tsx @@ -5,11 +5,11 @@ import messages from '../../messages'; import ActionButtons from './ActionButtons'; interface SidebarFooterProps { - locationId?: string, - displayUnitLocation?: boolean, - openDiscardModal: () => void, - handlePublishing: () => void, - hideCopyButton?: boolean, + locationId?: string; + displayUnitLocation?: boolean; + openDiscardModal: () => void; + handlePublishing: () => void; + hideCopyButton?: boolean; } const SidebarFooter = ({ diff --git a/src/course-unit/legacy-sidebar/index.tsx b/src/course-unit/legacy-sidebar/index.tsx index 313928a070..6592c3cdd1 100644 --- a/src/course-unit/legacy-sidebar/index.tsx +++ b/src/course-unit/legacy-sidebar/index.tsx @@ -10,9 +10,9 @@ import SplitTestSidebarInfo from './SplitTestSidebarInfo'; import PublishControls from '../unit-sidebar/unit-info/PublishControls'; export type XBlock = { - id: string, - name: string, - blockType: string, + id: string; + name: string; + blockType: string; }; export interface LegacySidebarProps { diff --git a/src/course-unit/move-modal/components/EmptyMessage.tsx b/src/course-unit/move-modal/components/EmptyMessage.tsx index 99737b0aa3..31f2ca5ef8 100644 --- a/src/course-unit/move-modal/components/EmptyMessage.tsx +++ b/src/course-unit/move-modal/components/EmptyMessage.tsx @@ -2,7 +2,7 @@ import { useIntl } from '@edx/frontend-platform/i18n'; import messages from '../messages'; -const EmptyMessage = ({ category, categoryText }: { category: string, categoryText: string }) => { +const EmptyMessage = ({ category, categoryText }: { category: string; categoryText: string }) => { const intl = useIntl(); return (
  • diff --git a/src/course-unit/unit-sidebar/unit-info/PublishControls.tsx b/src/course-unit/unit-sidebar/unit-info/PublishControls.tsx index f68882e5b1..c73d73316c 100644 --- a/src/course-unit/unit-sidebar/unit-info/PublishControls.tsx +++ b/src/course-unit/unit-sidebar/unit-info/PublishControls.tsx @@ -14,8 +14,8 @@ import messages from './messages'; import UnitVisibilityInfo from './UnitVisibilityInfo'; interface PublishControlsProps { - blockId?: string, - hideCopyButton?: boolean, + blockId?: string; + hideCopyButton?: boolean; } const PublishControls = ({ diff --git a/src/course-unit/xblock-container-iframe/index.scss b/src/course-unit/xblock-container-iframe/index.scss index c6c4196010..95ce7203a5 100644 --- a/src/course-unit/xblock-container-iframe/index.scss +++ b/src/course-unit/xblock-container-iframe/index.scss @@ -1,4 +1,4 @@ .xblock-container-iframe { - width: calc(100% + var(--pgn-spacing-spacer-base) * .3125); - margin: 0 calc(var(--pgn-spacing-spacer-base) * .3125 * -1); + width: calc(100% + var(--pgn-spacing-spacer-base) * .3125); + margin: 0 calc(var(--pgn-spacing-spacer-base) * .3125 * -1); } diff --git a/src/course-unit/xblock-container-iframe/types.ts b/src/course-unit/xblock-container-iframe/types.ts index 2c1b0757a4..f2024b22f5 100644 --- a/src/course-unit/xblock-container-iframe/types.ts +++ b/src/course-unit/xblock-container-iframe/types.ts @@ -30,7 +30,7 @@ export interface XBlockTypes { export interface XBlockContainerIframeProps { courseId: string; blockId: string; - isUnitVerticalType: boolean, + isUnitVerticalType: boolean; unitXBlockActions: { handleDelete: (XBlockId: string | null) => Promise | void; handleDuplicate: (XBlockId: string | null) => void; diff --git a/src/course-updates/update-form/utils.js b/src/course-updates/update-form/utils.js index f62e085a72..a0b4462095 100644 --- a/src/course-updates/update-form/utils.js +++ b/src/course-updates/update-form/utils.js @@ -8,11 +8,11 @@ import messages from './messages'; * @param {typeof REQUEST_TYPES} requestType - one of REQUEST_TYPES * @param {object} courseUpdatesInitialValues - form initial values depending on requestType * @returns {{ - * currentContent: string, - * validationSchema: object, - * formTitle: string, - * submitButtonText: string, - * contentFieldName: string + * currentContent: string, + * validationSchema: object, + * formTitle: string, + * submitButtonText: string, + * contentFieldName: string * }} */ const geUpdateFormSettings = (requestType, courseUpdatesInitialValues, intl) => { diff --git a/src/data/types.ts b/src/data/types.ts index 7dd267f4f8..1fd877a5cd 100644 --- a/src/data/types.ts +++ b/src/data/types.ts @@ -57,17 +57,17 @@ export interface UpstreamChildrenInfo { } export interface UpstreamInfo { - readyToSync: boolean, - upstreamRef: string, - upstreamName: string, - versionSynced: number, - versionAvailable: number | null, - versionDeclined: number | null, - errorMessage: string | null, - downstreamCustomized: string[], - topLevelParentKey?: string, - readyToSyncChildren?: UpstreamChildrenInfo[], - isReadyToSyncIndividually?: boolean, + readyToSync: boolean; + upstreamRef: string; + upstreamName: string; + versionSynced: number; + versionAvailable: number | null; + versionDeclined: number | null; + errorMessage: string | null; + downstreamCustomized: string[]; + topLevelParentKey?: string; + readyToSyncChildren?: UpstreamChildrenInfo[]; + isReadyToSyncIndividually?: boolean; } export interface XBlockBase { @@ -142,10 +142,10 @@ interface OutlineError { } export interface OutlinePageErrors { - outlineIndexApi?: OutlineError | null, - reindexApi?: OutlineError | null, - sectionLoadingApi?: OutlineError | null, - courseLaunchApi?: OutlineError | null, + outlineIndexApi?: OutlineError | null; + reindexApi?: OutlineError | null; + sectionLoadingApi?: OutlineError | null; + courseLaunchApi?: OutlineError | null; } export interface UsageKeyBlock { diff --git a/src/editors/containers/EditorContainer/components/CancelConfirmModal.tsx b/src/editors/containers/EditorContainer/components/CancelConfirmModal.tsx index 7f7859adb2..de3ad116a6 100644 --- a/src/editors/containers/EditorContainer/components/CancelConfirmModal.tsx +++ b/src/editors/containers/EditorContainer/components/CancelConfirmModal.tsx @@ -4,9 +4,9 @@ import BaseModal from '../../../sharedComponents/BaseModal'; import messages from '../messages'; interface CancelConfirmModalProps { - isOpen: boolean, - closeCancelConfirmModal: () => void, - onCloseEditor: (() => void) | null, + isOpen: boolean; + closeCancelConfirmModal: () => void; + onCloseEditor: (() => void) | null; } const CancelConfirmModal = ({ diff --git a/src/editors/containers/EditorContainer/components/TitleHeader/hooks.js b/src/editors/containers/EditorContainer/components/TitleHeader/hooks.js index d64801c071..c6588fa86f 100644 --- a/src/editors/containers/EditorContainer/components/TitleHeader/hooks.js +++ b/src/editors/containers/EditorContainer/components/TitleHeader/hooks.js @@ -18,7 +18,7 @@ export const state = { export const hooks = { isEditing: () => { - // eslint-disable-next-line react-hooks/rules-of-hooks + // eslint-disable-next-line react-hooks/rules-of-hooks const [isEditing, setIsEditing] = React.useState(false); return { isEditing, @@ -28,7 +28,7 @@ export const hooks = { }, localTitle: ({ dispatch, stopEditing }) => { - // eslint-disable-next-line react-hooks/rules-of-hooks + // eslint-disable-next-line react-hooks/rules-of-hooks const title = useSelector(selectors.app.displayTitle); const [localTitle, setLocalTitle] = module.state.localTitle(title); return { diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/index.scss b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/index.scss index ad6d2705a5..de0bf77ff6 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/index.scss +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/index.scss @@ -1,25 +1,25 @@ .settingsCardTitleSection { - padding-bottom: 0; + padding-bottom: 0; } .halfSpacedMessage { - padding-bottom: .5rem; + padding-bottom: .5rem; } .spacedMessage { - padding-bottom: 1.5rem; + padding-bottom: 1.5rem; } .settingsWidget { - margin-top: 40px; + margin-top: 40px; - .pgn__form-text { - font-size: small; - } + .pgn__form-text { + font-size: small; + } } .resetCard { - .resetSettingsButtons { - width: 100%; - } + .resetSettingsButtons { + width: 100%; + } } diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/Tolerance/messages.ts b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/Tolerance/messages.ts index 0f929473b1..3ac330ddcb 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/Tolerance/messages.ts +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/SettingsWidget/settingsComponents/Tolerance/messages.ts @@ -35,20 +35,17 @@ const messages = defineMessages({ id: 'problemEditor.settings.tolerance.type.percent', defaultMessage: 'Percentage', description: 'A possible value type for a tolerance', - }, typesNumber: { id: 'problemEditor.settings.tolerance.type.number', defaultMessage: 'Number', description: 'A possible value type for a tolerance', - }, typesNone: { id: 'problemEditor.settings.tolerance.type.none', defaultMessage: 'None', description: 'A possible value type for a tolerance', }, - }); export default messages; diff --git a/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss b/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss index e2e310f578..1f81d410f4 100644 --- a/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss +++ b/src/editors/containers/ProblemEditor/components/EditProblemView/index.scss @@ -55,16 +55,16 @@ } .pgn__modal-body-content { - .editor-body{ + .editor-body { overflow: visible !important; } .tox-tinymce, - .tox-editor-container{ + .tox-editor-container { overflow: visible; } - .tox-editor-header{ + .tox-editor-header { position: sticky; top: -3px; } diff --git a/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/index.test.tsx b/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/index.test.tsx index ee99b3a212..c525f160e0 100644 --- a/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/index.test.tsx +++ b/src/editors/containers/ProblemEditor/components/SelectTypeModal/SelectTypeWrapper/index.test.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { - screen, fireEvent, initializeMocks, -} from '@src/testUtils'; +import { screen, fireEvent, initializeMocks } from '@src/testUtils'; import { editorRender } from '@src/editors/editorTestRender'; import SelectTypeWrapper from './index'; import * as hooks from '../hooks'; diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/ErrorSummary.test.tsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/ErrorSummary.test.tsx index 938f9bf7cf..2387a38c48 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/ErrorSummary.test.tsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/ErrorSummary.test.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { - render, screen, initializeMocks, -} from '@src/testUtils'; +import { render, screen, initializeMocks } from '@src/testUtils'; import * as mod from './ErrorSummary'; diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/CollapsibleFormWidget.test.tsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/CollapsibleFormWidget.test.tsx index 6e3bcdb440..1e6bfbb14d 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/CollapsibleFormWidget.test.tsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/CollapsibleFormWidget.test.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { - render, screen, initializeMocks, -} from '@src/testUtils'; +import { render, screen, initializeMocks } from '@src/testUtils'; import CollapsibleFormWidget from './CollapsibleFormWidget'; describe('CollapsibleFormWidget', () => { diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/DurationWidget/index.scss b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/DurationWidget/index.scss index ed9a26ebfc..33de399bba 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/DurationWidget/index.scss +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/DurationWidget/index.scss @@ -1,3 +1,3 @@ .total-label { - border: 1px solid #707070; + border: 1px solid #707070; } diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseBlurb.test.tsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseBlurb.test.tsx index 24c9f207b4..f418dc155a 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseBlurb.test.tsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseBlurb.test.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { - render, screen, initializeMocks, -} from '@src/testUtils'; +import { render, screen, initializeMocks } from '@src/testUtils'; import LicenseBlurb from './LicenseBlurb'; @@ -13,7 +11,6 @@ describe('LicenseBlurb', () => { noncommercial: false, noDerivatives: false, shareAlike: false, - }, }; diff --git a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.test.tsx b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.test.tsx index b85057bb38..9be470ebf3 100644 --- a/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.test.tsx +++ b/src/editors/containers/VideoEditor/components/VideoSettingsModal/components/LicenseWidget/LicenseSelector.test.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { - render, fireEvent, screen, initializeMocks, -} from '@src/testUtils'; +import { render, fireEvent, screen, initializeMocks } from '@src/testUtils'; import { LicenseSelectorInternal } from './LicenseSelector'; import * as hooks from './hooks'; diff --git a/src/editors/data/constants/basicProblemTemplates/dropdown.js b/src/editors/data/constants/basicProblemTemplates/dropdown.js index ec51411e73..cfafbe8bec 100644 --- a/src/editors/data/constants/basicProblemTemplates/dropdown.js +++ b/src/editors/data/constants/basicProblemTemplates/dropdown.js @@ -7,12 +7,12 @@ const olx = ` -` +`; const markdown = `[[ an incorrect answer (the correct answer) an incorrect answer -]]` +]]`; export default { olx, markdown }; diff --git a/src/editors/data/constants/basicProblemTemplates/multiSelect.js b/src/editors/data/constants/basicProblemTemplates/multiSelect.js index 7ed6963bbd..f9c6e37e7b 100644 --- a/src/editors/data/constants/basicProblemTemplates/multiSelect.js +++ b/src/editors/data/constants/basicProblemTemplates/multiSelect.js @@ -1,5 +1,5 @@ /* eslint-disable */ - const olx= ` +const olx = ` @@ -7,12 +7,12 @@ -` +`; const markdown = `[x] a correct answer [ ] an incorrect answer [ ] an incorrect answer [x] a correct answer -` +`; export default { olx, markdown }; diff --git a/src/editors/data/constants/basicProblemTemplates/numeric.js b/src/editors/data/constants/basicProblemTemplates/numeric.js index d39c9a6e58..7b7e2648cd 100644 --- a/src/editors/data/constants/basicProblemTemplates/numeric.js +++ b/src/editors/data/constants/basicProblemTemplates/numeric.js @@ -4,8 +4,8 @@ const olx = ` -` +`; -const markdown = `= 100 +-5` +const markdown = `= 100 +-5`; export default { olx, markdown }; diff --git a/src/editors/data/constants/basicProblemTemplates/singleSelect.js b/src/editors/data/constants/basicProblemTemplates/singleSelect.js index ef4e2f2620..9370242a19 100644 --- a/src/editors/data/constants/basicProblemTemplates/singleSelect.js +++ b/src/editors/data/constants/basicProblemTemplates/singleSelect.js @@ -7,11 +7,11 @@ const olx = ` -` +`; const markdown = `( ) an incorrect answer (x) the correct answer ( ) an incorrect answer -` +`; -export default { olx, markdown }; \ No newline at end of file +export default { olx, markdown }; diff --git a/src/editors/data/constants/basicProblemTemplates/textInput.js b/src/editors/data/constants/basicProblemTemplates/textInput.js index 7240bfb188..4ccf518b35 100644 --- a/src/editors/data/constants/basicProblemTemplates/textInput.js +++ b/src/editors/data/constants/basicProblemTemplates/textInput.js @@ -1,13 +1,13 @@ /* eslint-disable */ -const olx =` +const olx = ` -` +`; const markdown = `= the correct answer or= optional acceptable variant of the correct answer -` +`; export default { olx, markdown }; diff --git a/src/editors/data/redux/index.ts b/src/editors/data/redux/index.ts index ca8b447d22..a1387d2e19 100644 --- a/src/editors/data/redux/index.ts +++ b/src/editors/data/redux/index.ts @@ -61,9 +61,9 @@ export interface EditorState { data: string | Record; metadata: Record; [otherKey: string]: any; - }, + }; // There are other fields; this is an AxiosResponse object. But we don't want to rely on those details. - }, + }; unitUrl: null | { data: { ancestors: { @@ -73,9 +73,9 @@ export interface EditorState { has_children: boolean; unit_level_discussions?: boolean; }[]; - }, + }; // There are other fields; this is an AxiosResponse object. But we don't want to rely on those details. - }, + }; blockContent: null; studioView: null; saveResponse: null; @@ -108,7 +108,7 @@ export interface EditorState { videos: Record; courseDetails: Record; showRawEditor: boolean; - }, + }; requests: Record; exampleValue: 'this is an example value from the redux state'; - } + }; } export { actions, selectors }; diff --git a/src/editors/sharedComponents/ErrorAlerts/ErrorAlert.jsx b/src/editors/sharedComponents/ErrorAlerts/ErrorAlert.jsx index 3e3ef935aa..1d49825e18 100644 --- a/src/editors/sharedComponents/ErrorAlerts/ErrorAlert.jsx +++ b/src/editors/sharedComponents/ErrorAlerts/ErrorAlert.jsx @@ -9,7 +9,7 @@ import messages from './messages'; export const hooks = { state: { - // eslint-disable-next-line react-hooks/rules-of-hooks + // eslint-disable-next-line react-hooks/rules-of-hooks isDismissed: (val) => React.useState(val), }, dismissalHooks: ({ dismissError, isError }) => { diff --git a/src/editors/sharedComponents/ErrorAlerts/FetchErrorAlert.jsx b/src/editors/sharedComponents/ErrorAlerts/FetchErrorAlert.jsx index e8a8167174..230657edd7 100644 --- a/src/editors/sharedComponents/ErrorAlerts/FetchErrorAlert.jsx +++ b/src/editors/sharedComponents/ErrorAlerts/FetchErrorAlert.jsx @@ -24,7 +24,6 @@ FetchErrorAlert.propTypes = { description: PropTypes.string, }).isRequired, isFetchError: PropTypes.bool.isRequired, - }; export default FetchErrorAlert; diff --git a/src/editors/sharedComponents/SelectionModal/index.scss b/src/editors/sharedComponents/SelectionModal/index.scss index 19d975b22f..e0ef67972a 100644 --- a/src/editors/sharedComponents/SelectionModal/index.scss +++ b/src/editors/sharedComponents/SelectionModal/index.scss @@ -1,40 +1,40 @@ .search-sort-menu .pgn__menu-item-text { - text-transform: capitalize; + text-transform: capitalize; } .search-sort-menu .pgn__menu .search-sort-menu-by { - display: none; + display: none; } /* Sort options come in pairs of ascending and descending. */ .search-sort-menu .pgn__menu > div:nth-child(even) { - border-bottom: 1px solid #F4F3F6; + border-bottom: 1px solid #F4F3F6; } .search-sort-menu .pgn__menu > div:last-child { - border-bottom: none; + border-bottom: none; } .selection-modal .pgn__vstack > .alert { - margin-bottom: 0; - margin-top: 1.5rem; + margin-bottom: 0; + margin-top: 1.5rem; } /* Set top padding to 0 when there is an alert above. */ .selection-modal .pgn__scrollable-body-content > .pgn__vstack > .alert + .gallery > .p-4 { - padding-top: 0 !important; + padding-top: 0 !important; } .selection-modal .pgn__vstack > .alert > .alert-icon { - /* Vertical margin equal to the vertical padding of the "Dismiss" button. */ - margin-bottom: .4375rem; - margin-top: .4375rem; + /* Vertical margin equal to the vertical padding of the "Dismiss" button. */ + margin-bottom: .4375rem; + margin-top: .4375rem; } .selection-modal-image-thumbnail { - width: 180px; - height: 101.25px; - object-fit: contain; - max-width: 100%; - max-height: 100%; + width: 180px; + height: 101.25px; + object-fit: contain; + max-width: 100%; + max-height: 100%; } diff --git a/src/editors/utils/formatLibraryImgRequest.ts b/src/editors/utils/formatLibraryImgRequest.ts index e5f1780da0..5194f58fb3 100644 --- a/src/editors/utils/formatLibraryImgRequest.ts +++ b/src/editors/utils/formatLibraryImgRequest.ts @@ -1,13 +1,13 @@ import { LibraryAssetResponse } from '../../library-authoring/data/api'; type GalleryImageData = { - displayName: string, - url: string, - externalUrl: string, - portableUrl: string, - thumbnail: string, - id: string, - locked: boolean, + displayName: string; + url: string; + externalUrl: string; + portableUrl: string; + thumbnail: string; + id: string; + locked: boolean; }; /** diff --git a/src/export-page/data/api.ts b/src/export-page/data/api.ts index 050a4e206b..2ea39c518f 100644 --- a/src/export-page/data/api.ts +++ b/src/export-page/data/api.ts @@ -11,7 +11,7 @@ export interface ExportStatusData { exportError?: { rawErrorMsg?: string; editUnitUrl?: string; - } + }; } export async function startCourseExporting(courseId: string): Promise { diff --git a/src/files-and-videos/files-page/FileInfoModalSidebar.scss b/src/files-and-videos/files-page/FileInfoModalSidebar.scss index b43c4b167b..fc3d3abaf9 100644 --- a/src/files-and-videos/files-page/FileInfoModalSidebar.scss +++ b/src/files-and-videos/files-page/FileInfoModalSidebar.scss @@ -13,4 +13,4 @@ -webkit-box-orient: vertical; overflow: hidden; } -/* stylelint-enable value-no-vendor-prefix */ \ No newline at end of file +/* stylelint-enable value-no-vendor-prefix */ diff --git a/src/files-and-videos/files-page/FilesPage.scss b/src/files-and-videos/files-page/FilesPage.scss index 6b27f995ae..db09e96c44 100644 --- a/src/files-and-videos/files-page/FilesPage.scss +++ b/src/files-and-videos/files-page/FilesPage.scss @@ -1,5 +1,5 @@ .files-table { - .pgn__data-table-container { - overflow-x: visible; - } + .pgn__data-table-container { + overflow-x: visible; + } } diff --git a/src/generic/DraggableList/SortableItem.tsx b/src/generic/DraggableList/SortableItem.tsx index 274fa1781c..bf0e3ffd1c 100644 --- a/src/generic/DraggableList/SortableItem.tsx +++ b/src/generic/DraggableList/SortableItem.tsx @@ -9,16 +9,16 @@ import { useIntl } from '@edx/frontend-platform/i18n'; import messages from './messages'; interface SortableItemProps { - id: string, - children?: React.ReactNode, - actions: React.ReactNode, - actionStyle?: {}, - componentStyle?: {}, - isClickable?: boolean, - onClick?: MouseEventHandler, - onKeyDown?: KeyboardEventHandler, - disabled?: boolean, - cardClassName?: string, + id: string; + children?: React.ReactNode; + actions: React.ReactNode; + actionStyle?: {}; + componentStyle?: {}; + isClickable?: boolean; + onClick?: MouseEventHandler; + onKeyDown?: KeyboardEventHandler; + disabled?: boolean; + cardClassName?: string; } const SortableItem = ({ diff --git a/src/generic/clipboard/paste-component/PasteComponent.scss b/src/generic/clipboard/paste-component/PasteComponent.scss index af6d3b035e..dd11dced7e 100644 --- a/src/generic/clipboard/paste-component/PasteComponent.scss +++ b/src/generic/clipboard/paste-component/PasteComponent.scss @@ -14,7 +14,6 @@ } } - .clipboard-popover { min-width: 21.25rem; diff --git a/src/generic/clipboard/paste-component/components/PopoverContent.tsx b/src/generic/clipboard/paste-component/components/PopoverContent.tsx index 70ac2808c9..1cc92aaa63 100644 --- a/src/generic/clipboard/paste-component/components/PopoverContent.tsx +++ b/src/generic/clipboard/paste-component/components/PopoverContent.tsx @@ -7,10 +7,10 @@ import type { ClipboardStatus } from '../../../data/api'; import messages from '../messages'; interface PopoverContentProps { - clipboardData: ClipboardStatus, + clipboardData: ClipboardStatus; } -const PopoverContent = ({ clipboardData } : PopoverContentProps) => { +const PopoverContent = ({ clipboardData }: PopoverContentProps) => { const intl = useIntl(); const { sourceEditUrl, content, sourceContextTitle } = clipboardData; diff --git a/src/generic/configure-modal/UnitTab.tsx b/src/generic/configure-modal/UnitTab.tsx index 765aa918b6..660154c1fe 100644 --- a/src/generic/configure-modal/UnitTab.tsx +++ b/src/generic/configure-modal/UnitTab.tsx @@ -11,39 +11,39 @@ import messages from './messages'; export type UserPartitionInfo = { selectablePartitions: { groups: { - deleted: boolean, - id: number, - name: string, - selected: boolean, - }[], - id: number, - name: string, - scheme: string, - }[], - selectedGroupsLabel?: string, - selectedPartitionIndex: number, + deleted: boolean; + id: number; + name: string; + selected: boolean; + }[]; + id: number; + name: string; + scheme: string; + }[]; + selectedGroupsLabel?: string; + selectedPartitionIndex: number; }; export interface UnitTabProps { - isXBlockComponent: boolean, - category?: string, + isXBlockComponent: boolean; + category?: string; values: { - isVisibleToStaffOnly: boolean, - discussionEnabled: boolean, - selectedPartitionIndex: number, - selectedGroups: string[], - }, - setFieldValue: (key: string, value: any) => void, - showWarning: boolean, - userPartitionInfo?: UserPartitionInfo, + isVisibleToStaffOnly: boolean; + discussionEnabled: boolean; + selectedPartitionIndex: number; + selectedGroups: string[]; + }; + setFieldValue: (key: string, value: any) => void; + showWarning: boolean; + userPartitionInfo?: UserPartitionInfo; } export const DiscussionEditComponent = ({ discussionEnabled, handleDiscussionChange, }: { - discussionEnabled: boolean, - handleDiscussionChange: (e: any) => void, + discussionEnabled: boolean; + handleDiscussionChange: (e: any) => void; }) => ( <> diff --git a/src/generic/sub-header/SubHeader.tsx b/src/generic/sub-header/SubHeader.tsx index d51d02fd30..341a6f7b5a 100644 --- a/src/generic/sub-header/SubHeader.tsx +++ b/src/generic/sub-header/SubHeader.tsx @@ -7,7 +7,7 @@ interface SubHeaderProps { breadcrumbs?: ReactElement | ReactElement[] | string | null; contentTitle?: string; description?: string; - instruction?: ReactElement | string, + instruction?: ReactElement | string; headerActions?: ReactElement | ReactElement[] | null; titleActions?: ReactElement | ReactElement[] | null; hideBorder?: boolean; diff --git a/src/generic/unlink-modal/UnlinkModal.tsx b/src/generic/unlink-modal/UnlinkModal.tsx index ca66e738f4..8ae6a8689a 100644 --- a/src/generic/unlink-modal/UnlinkModal.tsx +++ b/src/generic/unlink-modal/UnlinkModal.tsx @@ -23,7 +23,7 @@ type UnlinkModalPropsComponent = { type UnlinkModalProps = { isOpen: boolean; close: () => void; - onUnlinkSubmit: () => void | Promise, + onUnlinkSubmit: () => void | Promise; } & (UnlinkModalPropsContainer | UnlinkModalPropsComponent); export const UnlinkModal = ({ diff --git a/src/generic/upstream-info-icon/UpstreamInfoIcon.scss b/src/generic/upstream-info-icon/UpstreamInfoIcon.scss index 0f498fc774..9dfb2ac010 100644 --- a/src/generic/upstream-info-icon/UpstreamInfoIcon.scss +++ b/src/generic/upstream-info-icon/UpstreamInfoIcon.scss @@ -27,7 +27,6 @@ height: 18px; } - // Sizes with two icons: &.size-two-md { diff --git a/src/hooks.ts b/src/hooks.ts index c697e01fbf..cf4943e1d9 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -82,7 +82,7 @@ export const useLoadOnScroll = ( window.removeEventListener('scroll', onscroll); }; } - return () => { }; + return () => {}; }, [hasNextPage, isFetchingNextPage, fetchNextPage]); }; diff --git a/src/legacy-libraries-migration/index.scss b/src/legacy-libraries-migration/index.scss index 980563bd59..c399b9a1d6 100644 --- a/src/legacy-libraries-migration/index.scss +++ b/src/legacy-libraries-migration/index.scss @@ -8,7 +8,7 @@ } .migration-content { - flex: 1; + flex: 1; } .card-item { @@ -18,7 +18,7 @@ .confirmation-view { .pgn__card-header-content { - margin-top: calc(var(--pgn-spacing-spacer-base)) !important;; + margin-top: calc(var(--pgn-spacing-spacer-base)) !important; } } diff --git a/src/library-authoring/LibraryContent.tsx b/src/library-authoring/LibraryContent.tsx index 416d1a57b3..f5ffae3e00 100644 --- a/src/library-authoring/LibraryContent.tsx +++ b/src/library-authoring/LibraryContent.tsx @@ -18,7 +18,7 @@ import PlaceholderCard from './import-course/PlaceholderCard'; * * Use content to: * - 'collections': Suggest to create a collection on empty state. -* - Anything else to suggest to add content on empty state. + * - Anything else to suggest to add content on empty state. */ type LibraryContentProps = { diff --git a/src/library-authoring/collections/CollectionDetails.tsx b/src/library-authoring/collections/CollectionDetails.tsx index 13a85a4b74..47010262a5 100644 --- a/src/library-authoring/collections/CollectionDetails.tsx +++ b/src/library-authoring/collections/CollectionDetails.tsx @@ -13,10 +13,10 @@ import HistoryWidget from '../generic/history-widget'; import messages from './messages'; interface BlockCountProps { - count: number, - blockType?: string, - label: React.ReactNode, - className?: string, + count: number; + blockType?: string; + label: React.ReactNode; + className?: string; } const BlockCount = ({ diff --git a/src/library-authoring/common/context/ComponentPickerContext.tsx b/src/library-authoring/common/context/ComponentPickerContext.tsx index 28b15a39bb..ca5c965bd5 100644 --- a/src/library-authoring/common/context/ComponentPickerContext.tsx +++ b/src/library-authoring/common/context/ComponentPickerContext.tsx @@ -31,7 +31,7 @@ type NoComponentPickerType = { type BasePickerType = { restrictToLibrary: boolean; - extraFilter: string[], + extraFilter: string[]; isLoading?: boolean; setIsLoading?: React.Dispatch>; }; @@ -65,7 +65,7 @@ const ComponentPickerContext = createContext void; + blockType?: string; + onClose?: (data?: any) => void; } export type LibraryContextData = { @@ -47,8 +47,8 @@ export type LibraryContextData = { /** If the editor is open and the user is editing some component, this is the component being edited. */ componentBeingEdited: ComponentEditorInfo | undefined; /** If an onClose callback is provided, it will be called when the editor is closed. */ - openComponentEditor: (usageKey: string, onClose?: (data?:any) => void, blockType?:string) => void; - closeComponentEditor: (data?:any) => void; + openComponentEditor: (usageKey: string, onClose?: (data?: any) => void, blockType?: string) => void; + closeComponentEditor: (data?: any) => void; componentPicker?: typeof ComponentPicker; blockTypesData?: Record; }; @@ -66,7 +66,7 @@ const LibraryContext = createContext(undefined); type LibraryProviderProps = { libraryId: string; children?: React.ReactNode; - extraFilter?: string[] + extraFilter?: string[]; // If set, will initialize the current collection and/or component from the current URL skipUrlUpdate?: boolean; @@ -96,7 +96,7 @@ export const LibraryProvider = ({ return undefined; }); }, []); - const openComponentEditor = useCallback((usageKey: string, onClose?: () => void, blockType?:string) => { + const openComponentEditor = useCallback((usageKey: string, onClose?: () => void, blockType?: string) => { setComponentBeingEdited({ usageKey, onClose, blockType }); }, []); diff --git a/src/library-authoring/components/ComponentCard.tsx b/src/library-authoring/components/ComponentCard.tsx index 2317f33f3e..f52b59265d 100644 --- a/src/library-authoring/components/ComponentCard.tsx +++ b/src/library-authoring/components/ComponentCard.tsx @@ -12,7 +12,7 @@ import BaseCard from './BaseCard'; import { ComponentMenu } from './ComponentMenu'; type ComponentCardProps = { - hit: ContentHit, + hit: ContentHit; }; const ComponentCard = ({ hit }: ComponentCardProps) => { diff --git a/src/library-authoring/components/ComponentEditorModal.tsx b/src/library-authoring/components/ComponentEditorModal.tsx index 3175db0d6a..51c77b1761 100644 --- a/src/library-authoring/components/ComponentEditorModal.tsx +++ b/src/library-authoring/components/ComponentEditorModal.tsx @@ -29,7 +29,7 @@ export const ComponentEditorModal: React.FC> = () => { } const blockType = componentBeingEdited.blockType || getBlockType(componentBeingEdited.usageKey); - const onClose = (data?:any) => { + const onClose = (data?: any) => { closeComponentEditor(data); invalidateComponentData(queryClient, libraryId, componentBeingEdited.usageKey); }; diff --git a/src/library-authoring/containers/ContainerCard.scss b/src/library-authoring/containers/ContainerCard.scss index f5c6b6bb1c..94de2f6139 100644 --- a/src/library-authoring/containers/ContainerCard.scss +++ b/src/library-authoring/containers/ContainerCard.scss @@ -1,7 +1,7 @@ .container-card-preview-text { - display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ - line-clamp: 3; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -}; + display: -webkit-box; /* stylelint-disable-line value-no-vendor-prefix */ + line-clamp: 3; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} diff --git a/src/library-authoring/containers/ContainerDeleter.tsx b/src/library-authoring/containers/ContainerDeleter.tsx index 6538e05386..db32b4a225 100644 --- a/src/library-authoring/containers/ContainerDeleter.tsx +++ b/src/library-authoring/containers/ContainerDeleter.tsx @@ -15,13 +15,13 @@ import { useContentFromSearchIndex, useDeleteContainer, useRestoreContainer } fr import messages from './messages'; type ContainerDeleterProps = { - close: () => void, - containerId: string, + close: () => void; + containerId: string; }; type ContainerParents = { - displayName?: string[], - key?: string[], + displayName?: string[]; + key?: string[]; }; const getOtherParentContainers = (containerParents?: ContainerParents, currentParentId?: string) => { diff --git a/src/library-authoring/containers/ContainerRemover.tsx b/src/library-authoring/containers/ContainerRemover.tsx index 54acea653a..6038f9fd0c 100644 --- a/src/library-authoring/containers/ContainerRemover.tsx +++ b/src/library-authoring/containers/ContainerRemover.tsx @@ -17,10 +17,10 @@ import { Container } from '@src/library-authoring/data/api'; import { usePublishedFilterContext } from '@src/library-authoring/common/context/PublishedFilterContext'; type ContainerRemoverProps = { - close: () => void, - containerKey: string, - displayName: string, - index?: number, + close: () => void; + containerKey: string; + displayName: string; + index?: number; }; const ContainerRemover = ({ diff --git a/src/library-authoring/create-legacy-library/CreateLegacyLibrary.tsx b/src/library-authoring/create-legacy-library/CreateLegacyLibrary.tsx index 260cab0cee..0ff6fc5722 100644 --- a/src/library-authoring/create-legacy-library/CreateLegacyLibrary.tsx +++ b/src/library-authoring/create-legacy-library/CreateLegacyLibrary.tsx @@ -41,9 +41,9 @@ export const CreateLegacyLibrary = ({ handleCancel, handlePostCreate, }: { - showInModal?: boolean, - handleCancel?: () => void, - handlePostCreate?: (library: LibraryV1Data) => void, + showInModal?: boolean; + handleCancel?: () => void; + handlePostCreate?: (library: LibraryV1Data) => void; }) => { const intl = useIntl(); const navigate = useNavigate(); diff --git a/src/library-authoring/create-legacy-library/data/api.ts b/src/library-authoring/create-legacy-library/data/api.ts index 8652eb8a69..2ba9425fdb 100644 --- a/src/library-authoring/create-legacy-library/data/api.ts +++ b/src/library-authoring/create-legacy-library/data/api.ts @@ -9,9 +9,9 @@ import type { LibraryV1Data } from '@src/studio-home/data/api'; export const getContentLibraryV1CreateApiUrl = () => `${getConfig().STUDIO_BASE_URL}/library/`; export interface CreateContentLibraryV1Args { - displayName: string, - org: string, - number: string, + displayName: string; + org: string; + number: string; } /** diff --git a/src/library-authoring/create-library/data/api.ts b/src/library-authoring/create-library/data/api.ts index 392899b52d..e0b26ab582 100644 --- a/src/library-authoring/create-library/data/api.ts +++ b/src/library-authoring/create-library/data/api.ts @@ -13,10 +13,10 @@ const getApiBaseUrl = () => getConfig().STUDIO_BASE_URL; export const getContentLibraryV2CreateApiUrl = () => `${getApiBaseUrl()}/api/libraries/v2/`; export interface CreateContentLibraryArgs { - title: string, - org: string, - slug: string, - learning_package?: number, + title: string; + org: string; + slug: string; + learning_package?: number; } /** diff --git a/src/library-authoring/generic/history-widget/HistoryWidget.scss b/src/library-authoring/generic/history-widget/HistoryWidget.scss index 2a9f946bd0..5df2e8cc8c 100644 --- a/src/library-authoring/generic/history-widget/HistoryWidget.scss +++ b/src/library-authoring/generic/history-widget/HistoryWidget.scss @@ -3,4 +3,3 @@ border-radius: 4px; padding-left: 1rem; } - diff --git a/src/library-authoring/hierarchy/ItemHierarchy.tsx b/src/library-authoring/hierarchy/ItemHierarchy.tsx index eccd2179fd..ad613318d1 100644 --- a/src/library-authoring/hierarchy/ItemHierarchy.tsx +++ b/src/library-authoring/hierarchy/ItemHierarchy.tsx @@ -21,12 +21,12 @@ const HierarchyRow = ({ willPublish = false, publishMessage = undefined, }: { - containerType: ContainerType, - text: string, - selected: boolean, - showArrow: boolean, - willPublish?: boolean, - publishMessage?: MessageDescriptor, + containerType: ContainerType; + text: string; + selected: boolean; + showArrow: boolean; + willPublish?: boolean; + publishMessage?: MessageDescriptor; }) => ( void, - canClear?: boolean, + variant?: 'link' | 'primary'; + size?: 'sm' | 'md' | 'lg' | 'inline'; + onClear?: () => void; + canClear?: boolean; }; /** diff --git a/src/search-manager/SearchKeywordsField.tsx b/src/search-manager/SearchKeywordsField.tsx index bbe3b67f82..53c7745789 100644 --- a/src/search-manager/SearchKeywordsField.tsx +++ b/src/search-manager/SearchKeywordsField.tsx @@ -9,9 +9,9 @@ import { useSearchContext } from './SearchManager'; * The "main" input field where users type in search keywords. The search happens as they type (no need to press enter). */ const SearchKeywordsField: React.FC<{ - className?: string, - placeholder?: string, - autoFocus?: boolean, + className?: string; + placeholder?: string; + autoFocus?: boolean; }> = (props) => { const intl = useIntl(); const { searchKeywords, setSearchKeywords, usageKey } = useSearchContext(); @@ -21,7 +21,7 @@ const SearchKeywordsField: React.FC<{ const handleSearch = React.useCallback( debounce((term) => setSearchKeywords(term.trim()), 400), [searchKeywords], - );// Perform search after 500ms + ); // Perform search after 500ms return ( (undefined); export const SearchContextProvider: React.FC<{ - extraFilter?: Filter, - overrideTypesFilter?: TypesFilterData, - overrideSearchSortOrder?: SearchSortOption - children: React.ReactNode, - closeSearchModal?: () => void, - skipBlockTypeFetch?: boolean, - skipUrlUpdate?: boolean, + extraFilter?: Filter; + overrideTypesFilter?: TypesFilterData; + overrideSearchSortOrder?: SearchSortOption; + children: React.ReactNode; + closeSearchModal?: () => void; + skipBlockTypeFetch?: boolean; + skipUrlUpdate?: boolean; }> = ({ overrideTypesFilter, overrideSearchSortOrder, diff --git a/src/search-modal/SearchResult.tsx b/src/search-modal/SearchResult.tsx index d75db66c0f..d3c5863b9f 100644 --- a/src/search-modal/SearchResult.tsx +++ b/src/search-modal/SearchResult.tsx @@ -16,7 +16,7 @@ import messages from './messages'; /** * Returns the URL Suffix for library/library component hit -*/ + */ function getLibraryComponentUrlSuffix(hit: ContentHit): string { const { contextKey } = hit; return `library/${contextKey}`; @@ -24,7 +24,7 @@ function getLibraryComponentUrlSuffix(hit: ContentHit): string { /** * Returns the URL Suffix for a unit hit -*/ + */ function getUnitUrlSuffix(hit: ContentHit): string { const { contextKey, usageKey } = hit; return `course/${contextKey}/container/${usageKey}`; @@ -32,7 +32,7 @@ function getUnitUrlSuffix(hit: ContentHit): string { /** * Returns the URL Suffix for a unit component hit -*/ + */ function getUnitComponentUrlSuffix(hit: ContentHit): string { const { breadcrumbs, contextKey, usageKey } = hit; if (breadcrumbs.length > 1) { @@ -59,7 +59,7 @@ function getUnitComponentUrlSuffix(hit: ContentHit): string { /** * Returns the URL Suffix for a course component hit -*/ + */ function getCourseComponentUrlSuffix(hit: ContentHit): string { const { contextKey, usageKey } = hit; return `course/${contextKey}?show=${encodeURIComponent(usageKey)}`; @@ -67,7 +67,7 @@ function getCourseComponentUrlSuffix(hit: ContentHit): string { /** * Returns the URL Suffix for the search hit param -*/ + */ function getUrlSuffix(hit: ContentHit): string { const { blockType, breadcrumbs } = hit; diff --git a/src/search-modal/__mocks__/empty-search-result.json b/src/search-modal/__mocks__/empty-search-result.json index a0ba5d6db9..c5d1ce0049 100644 --- a/src/search-modal/__mocks__/empty-search-result.json +++ b/src/search-modal/__mocks__/empty-search-result.json @@ -19,7 +19,7 @@ "offset": 0, "estimatedTotalHits": 0, "facetDistribution": { - "block_type": {} + "block_type": {} }, "facetStats": {} } diff --git a/src/search-modal/__mocks__/facet-search.json b/src/search-modal/__mocks__/facet-search.json index 71db55107e..91b7847f71 100644 --- a/src/search-modal/__mocks__/facet-search.json +++ b/src/search-modal/__mocks__/facet-search.json @@ -1,11 +1,11 @@ { "facetHits": [ - { "value": "ESDC Skills and Competencies", "count": 7 }, - { "value": "FlatTaxonomy", "count": 7 }, - { "value": "HierarchicalTaxonomy", "count": 6 }, - { "value": "Lightcast Open Skills Taxonomy", "count": 6 }, - { "value": "MultiOrgTaxonomy", "count": 7 }, - { "value": "TwoLevelTaxonomy", "count": 7 } + { "value": "ESDC Skills and Competencies", "count": 7 }, + { "value": "FlatTaxonomy", "count": 7 }, + { "value": "HierarchicalTaxonomy", "count": 6 }, + { "value": "Lightcast Open Skills Taxonomy", "count": 6 }, + { "value": "MultiOrgTaxonomy", "count": 7 }, + { "value": "TwoLevelTaxonomy", "count": 7 } ], "facetQuery": "", "processingTimeMs": 0 diff --git a/src/studio-home/collapsible-state-with-action/CollapsibleStateWithAction.test.jsx b/src/studio-home/collapsible-state-with-action/CollapsibleStateWithAction.test.jsx index da22765206..537ee746a6 100644 --- a/src/studio-home/collapsible-state-with-action/CollapsibleStateWithAction.test.jsx +++ b/src/studio-home/collapsible-state-with-action/CollapsibleStateWithAction.test.jsx @@ -23,8 +23,8 @@ jest.mock('react-redux', () => ({ useSelector: jest.fn(), })); -let store; let - axiosMock; +let store; +let axiosMock; const { studioName, diff --git a/src/studio-home/tabs-section/courses-tab/courses-filters/index.tsx b/src/studio-home/tabs-section/courses-tab/courses-filters/index.tsx index 00c2a3ef33..cc12309d2d 100644 --- a/src/studio-home/tabs-section/courses-tab/courses-filters/index.tsx +++ b/src/studio-home/tabs-section/courses-tab/courses-filters/index.tsx @@ -31,10 +31,10 @@ interface BaseFilter { const regexOnlyWhiteSpaces = /^\s+$/; interface Props { - dispatch: Dispatch, - locationValue: string, - onSubmitSearchField?: () => void, - isLoading?: boolean, + dispatch: Dispatch; + locationValue: string; + onSubmitSearchField?: () => void; + isLoading?: boolean; } const CoursesFilters = ({