Skip to content

Commit

Permalink
chore: bump frontend-build, remove exceptions for prefer-default-expo…
Browse files Browse the repository at this point in the history
…rt (#1519)
  • Loading branch information
bradenmacdonald authored Nov 20, 2024
1 parent 624f5ad commit 66577b0
Show file tree
Hide file tree
Showing 108 changed files with 90 additions and 160 deletions.
128 changes: 81 additions & 47 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@openedx-plugins/course-app-teams": "file:plugins/course-apps/teams",
"@openedx-plugins/course-app-wiki": "file:plugins/course-apps/wiki",
"@openedx-plugins/course-app-xpert_unit_summary": "file:plugins/course-apps/xpert_unit_summary",
"@openedx/frontend-build": "^14.0.14",
"@openedx/frontend-build": "^14.2.0",
"@openedx/frontend-plugin-framework": "^1.2.1",
"@openedx/paragon": "^22.8.1",
"@redux-devtools/extension": "^3.3.0",
Expand Down
1 change: 0 additions & 1 deletion plugins/course-apps/live/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { ensureConfig, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { bbbPlanTypes } from '../constants';
Expand Down
1 change: 0 additions & 1 deletion plugins/course-apps/teams/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { getConfig } from '@edx/frontend-platform';

import { GroupTypes } from 'CourseAuthoring/data/constants';
Expand Down
1 change: 0 additions & 1 deletion src/advanced-settings/__mocks__/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as advancedSettingsMock } from './advancedSettings';
1 change: 0 additions & 1 deletion src/advanced-settings/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { convertObjectToSnakeCase } from '../../utils';
Expand Down
1 change: 0 additions & 1 deletion src/advanced-settings/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as AdvancedSettings } from './AdvancedSettings';
1 change: 0 additions & 1 deletion src/certificates/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { v4 as uuid } from 'uuid';

// eslint-disable-next-line import/prefer-default-export
export const defaultCertificate = {
courseTitle: '',
signatories: [{
Expand Down
1 change: 0 additions & 1 deletion src/certificates/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
1 change: 0 additions & 1 deletion src/certificates/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as Certificates } from './Certificates';
1 change: 0 additions & 1 deletion src/certificates/layout/certificates-sidebar/utils.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const getSidebarData = ({ messages, intl }) => [
{
title: intl.formatMessage(messages.workingWithCertificatesTitle),
Expand Down
1 change: 0 additions & 1 deletion src/certificates/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { convertObjectToSnakeCase } from '../utils';

// eslint-disable-next-line import/prefer-default-export
export const prepareCertificatePayload = (data) => convertObjectToSnakeCase(({
...data,
courseTitle: data.courseTitle,
Expand Down
1 change: 0 additions & 1 deletion src/content-tags-drawer/common/context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-check
/* eslint-disable import/prefer-default-export */
import React from 'react';

/** @typedef {import("../data/types.mjs").TagsInTaxonomy} TagsInTaxonomy */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export { default as ContentTagsDrawer } from './ContentTagsDrawer';
// eslint-disable-next-line import/prefer-default-export
export { default as ContentTagsDrawerSheet } from './ContentTagsDrawerSheet';
1 change: 0 additions & 1 deletion src/content-tags-drawer/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export const extractOrgFromContentId = (contentId) => contentId.split('+')[0].split(':')[1];
export const languageExportId = 'languages-v1';
1 change: 0 additions & 1 deletion src/course-outline/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,5 +361,4 @@ const useCourseOutline = ({ courseId }) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useCourseOutline };
1 change: 0 additions & 1 deletion src/course-outline/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as CourseOutline } from './CourseOutline';
1 change: 0 additions & 1 deletion src/course-outline/outline-sidebar/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,4 @@ const getFormattedSidebarMessages = (docsLinks, intl) => {
];
};

// eslint-disable-next-line import/prefer-default-export
export { getFormattedSidebarMessages };
1 change: 0 additions & 1 deletion src/course-rerun/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ const useCourseRerun = (courseId) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useCourseRerun };
1 change: 0 additions & 1 deletion src/course-team/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,4 @@ const useCourseTeam = ({ courseId }) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useCourseTeam };
1 change: 0 additions & 1 deletion src/course-team/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ const getInfoModalSettings = (modalType, currentEmail, errorMessage, courseName,
}
};

// eslint-disable-next-line import/prefer-default-export
export { getInfoModalSettings };
1 change: 0 additions & 1 deletion src/course-unit/clipboard/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as PasteNotificationAlert } from './paste-notification';
1 change: 0 additions & 1 deletion src/course-unit/clipboard/paste-notification/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
* @returns {boolean|null} - The status of the alert. Returns `true` if the fileList has length,
* `false` if it does not, and `null` if fileList is not defined.
*/
// eslint-disable-next-line import/prefer-default-export
export const getAlertStatus = (fileList, alertKey, alertState) => (
fileList?.length ? fileList && alertState[alertKey] : null);
1 change: 0 additions & 1 deletion src/course-unit/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { camelCaseObject } from '@edx/frontend-platform';
import { NOTIFICATION_MESSAGES } from '../../constants';
import { PUBLISH_TYPES } from '../constants';

// eslint-disable-next-line import/prefer-default-export
export function normalizeCourseSectionVerticalData(metadata) {
const data = camelCaseObject(metadata);
return {
Expand Down
1 change: 0 additions & 1 deletion src/course-unit/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { PUBLISH_TYPES } from './constants';

import { useCopyToClipboard } from '../generic/clipboard';

// eslint-disable-next-line import/prefer-default-export
export const useCourseUnit = ({ courseId, blockId }) => {
const dispatch = useDispatch();
const [searchParams] = useSearchParams();
Expand Down
1 change: 0 additions & 1 deletion src/course-unit/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as CourseUnit } from './CourseUnit';
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const REQUEST_TYPES = {
add_new_update: 'add_new_update',
edit_update: 'edit_update',
Expand Down
1 change: 0 additions & 1 deletion src/course-updates/course-update/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ const isDateForUpdateValid = (date) => {
return parsedDate.isValid() && parsedDate.format(COMMA_SEPARATED_DATE_FORMAT) === date;
};

// eslint-disable-next-line import/prefer-default-export
export { isDateForUpdateValid };
1 change: 0 additions & 1 deletion src/course-updates/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,4 @@ const useCourseUpdates = ({ courseId }) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useCourseUpdates };
1 change: 0 additions & 1 deletion src/course-updates/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as CourseUpdates } from './CourseUpdates';
1 change: 0 additions & 1 deletion src/course-updates/update-form/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ const geUpdateFormSettings = (requestType, courseUpdatesInitialValues, intl) =>
}
};

// eslint-disable-next-line import/prefer-default-export
export { geUpdateFormSettings };
1 change: 0 additions & 1 deletion src/course-updates/utils.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const matchesAnyStatus = (statuses, status) => Object.values(statuses).some(s => s === status);
1 change: 0 additions & 1 deletion src/custom-pages/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, ensureConfig, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
2 changes: 0 additions & 2 deletions src/custom-pages/data/selectors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */

export const getLoadingStatus = (state) => state.customPages.loadingStatus;
export const getSavingStatus = (state) => state.customPages.savingStatus;
export const getCustomPagesApiStatus = (state) => state.customPages.customPagesApiStatus;
Expand Down
2 changes: 0 additions & 2 deletions src/data/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */

/**
* Enum for request status.
* @readonly
Expand Down
1 change: 0 additions & 1 deletion src/data/selectors.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const getWaffleFlags = (state) => state.courseDetail?.waffleFlags;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import messages from './messages';

export const ToleranceTypes = {
Expand All @@ -9,7 +8,6 @@ export const ToleranceTypes = {
number: {
type: 'Number',
message: messages.typesNumber,

},
none: {
type: 'None',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */

import { flatten } from 'lodash';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const analyticsEvents = {
socialSharingSettingChanged: 'edx.social.video_sharing_setting.changed',
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { StrictDict } from '../../utils';

/* eslint-disable import/prefer-default-export */
export const blockTypes = StrictDict({
html: 'html',
video: 'video',
Expand Down
1 change: 0 additions & 1 deletion src/editors/sharedComponents/Button/hooks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
export const isVariantAdd = (variant) => variant === 'add';

export const getButtonProps = ({ variant, className, Add }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
const FORM_CONTROL_SIZES = {
SMALL: 'sm',
LARGE: 'lg',
Expand Down
2 changes: 1 addition & 1 deletion src/editors/sharedComponents/SelectableBox/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { RadioControl } from './FormRadio';
import FormRadioSet from './FormRadioSet';
import FormCheckboxSet from './FormCheckboxSet';

// eslint-disable-next-line import/prefer-default-export,consistent-return
// eslint-disable-next-line consistent-return
export const getInputType = (component, type) => {
if (component === 'SelectableBox') {
switch (type) {
Expand Down
1 change: 0 additions & 1 deletion src/editors/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
export { default as StrictDict } from './StrictDict';
export { default as keyStore } from './keyStore';
export { default as camelizeKeys } from './camelizeKeys';
Expand Down
1 change: 0 additions & 1 deletion src/export-page/__mocks__/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as exportPageMock } from './exportPage';
1 change: 0 additions & 1 deletion src/export-page/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
1 change: 0 additions & 1 deletion src/files-and-videos/files-page/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, ensureConfig, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
2 changes: 1 addition & 1 deletion src/files-and-videos/generic/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const sortFiles = (files, sortType) => { // eslint-disable-line import/prefer-default-export
export const sortFiles = (files, sortType) => {
const [sort, direction] = sortType.split(',');
let sortedFiles;
if (sort === 'displayName') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/* eslint-disable import/prefer-default-export */
export { default as FilesPage } from './files-page';
export { default as VideosPage } from './videos-page';
1 change: 0 additions & 1 deletion src/generic/__mocks__/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as contentTagsCountMock } from './contentTagsCount';
1 change: 0 additions & 1 deletion src/generic/clipboard/paste-component/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from 'prop-types';

/* eslint-disable import/prefer-default-export */
export const clipboardPropsTypes = {
sourceEditUrl: PropTypes.string.isRequired,
content: PropTypes.shape({
Expand Down
1 change: 0 additions & 1 deletion src/generic/create-or-rerun-course/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,4 @@ const useCreateOrRerunCourse = (initialValues) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useCreateOrRerunCourse };
1 change: 0 additions & 1 deletion src/generic/divider/index.jsx
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as Divider } from './Divider';
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const otherLinkURLParams = {
scheduleAndDetails: 'settings/details',
grading: 'settings/grading',
Expand Down
1 change: 0 additions & 1 deletion src/generic/hooks/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { useEventListener } from './useEventListener';
1 change: 0 additions & 1 deletion src/generic/hooks/useEventListener.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useRef, MutableRefObject } from 'react';

// eslint-disable-next-line import/prefer-default-export
export function useEventListener<K extends keyof WindowEventMap>(
type: K,
handler: (event: WindowEventMap[K]) => void,
Expand Down
1 change: 0 additions & 1 deletion src/generic/processing-notification/data/selectors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const getProcessingNotification = (state) => ({
isShow: state.processingNotification.isShow,
title: state.processingNotification.title,
Expand Down
1 change: 0 additions & 1 deletion src/generic/saving-error-alert/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ const handleResponseErrors = (error, dispatch, savingStatusFunction) => {
return false;
};

// eslint-disable-next-line import/prefer-default-export
export { handleResponseErrors };
1 change: 0 additions & 1 deletion src/grading-settings/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
1 change: 0 additions & 1 deletion src/grading-settings/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/* eslint-disable import/prefer-default-export */
export { default as GradingSettings } from './GradingSettings';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Yup from 'yup';
import messages from './messages';
import { allGroupNamesAreUnique } from './utils';

// eslint-disable-next-line import/prefer-default-export
export const experimentFormValidationSchema = (formatMessage) => Yup.object().shape({
id: Yup.number(),
name: Yup.string()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ const getSidebarData = ({
}
return groups;
};
// eslint-disable-next-line import/prefer-default-export

export { getSidebarData };
1 change: 0 additions & 1 deletion src/group-configurations/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,4 @@ const useGroupConfigurations = (courseId) => {
};
};

// eslint-disable-next-line import/prefer-default-export
export { useGroupConfigurations };
1 change: 0 additions & 1 deletion src/help-urls/__mocks__/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as helpUrls } from './helpUrls';
1 change: 0 additions & 1 deletion src/help-urls/data/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/prefer-default-export */
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';

Expand Down
1 change: 0 additions & 1 deletion src/help-urls/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { RequestStatus } from '../../data/constants';
import { getHelpUrls } from './api';
import { updateLoadingHelpUrlsStatus, updatePages } from './slice';

/* eslint-disable import/prefer-default-export */
export function fetchHelpUrls() {
return async (dispatch) => {
dispatch(updateLoadingHelpUrlsStatus({ status: RequestStatus.IN_PROGRESS }));
Expand Down
2 changes: 1 addition & 1 deletion src/help-urls/hooks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const useHelpUrls = (tokenNames) => {

return helpTokens;
};
/* eslint-disable-next-line import/prefer-default-export */

export { useHelpUrls };
1 change: 0 additions & 1 deletion src/import-page/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { LAST_IMPORT_COOKIE_NAME } from './data/constants';
* @param {string} fileName - File name.
* @returns {void}
*/
// eslint-disable-next-line import/prefer-default-export
export const setImportCookie = (date, completed, fileName) => {
const cookies = new Cookies();
cookies.set(LAST_IMPORT_COOKIE_NAME, { date, completed, fileName }, { path: window.location.pathname });
Expand Down
1 change: 0 additions & 1 deletion src/library-authoring/__mocks__/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export { default as libraryComponentsMock } from './libraryComponentsMock';
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface PickLibraryContentModalProps {
onClose: () => void;
}

// eslint-disable-next-line import/prefer-default-export
export const PickLibraryContentModal: React.FC<PickLibraryContentModalProps> = ({
isOpen,
onClose,
Expand Down
1 change: 0 additions & 1 deletion src/library-authoring/add-content/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export { default as AddContentContainer } from './AddContentContainer';
export { default as AddContentHeader } from './AddContentHeader';
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-nested-ternary */
/* eslint-disable import/prefer-default-export */
import React from 'react';
import {
Button,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-nested-ternary */
/* eslint-disable import/prefer-default-export */
import React from 'react';
import {
Alert,
Expand Down
Loading

0 comments on commit 66577b0

Please sign in to comment.