Skip to content

Commit

Permalink
Reinstate the @typescript-eslint/ban-ts-comment rule + fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Jan 7, 2025
1 parent e8b33c1 commit 2cd1cc6
Show file tree
Hide file tree
Showing 37 changed files with 61 additions and 49 deletions.
14 changes: 12 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ module.exports = [
additionalHooks: "useDeepCompareEffect"
}
],
"no-only-tests/no-only-tests": "warn" // Warn on `.only` in tests
"no-only-tests/no-only-tests": "warn", // Warn on `.only` in tests
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": true, // flag all `@ts-ignore` comments
"ts-expect-error": true, // flag all `@ts-expect-error` comments
"ts-nocheck": true, // flag all `@ts-nocheck` comments
"ts-check": true // flag all `@ts-check` comments
}
]
}
},
// JS/JSX-specific rules
Expand Down Expand Up @@ -190,7 +199,8 @@ module.exports = [
"src/core/fbs/fbs.ts",
"src/core/publizon/publizon.ts",
"src/**/*.test.ts",
"src/**/*.test.tsx"
"src/**/*.test.tsx",
"eslint.config.js"
]
}
];
2 changes: 1 addition & 1 deletion src/apps/advanced-search/AdvancedSearch.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import AdvancedSearchEntry from "./AdvancedSearch.entry";
const meta: Meta<typeof AdvancedSearchEntry> = {
title: "Apps / Advanced Search",
component: AdvancedSearchEntry,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/advanced-search/AdvancedSearchRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AdvancedSearchRow: React.FC<AdvancedSearchRowProps> = ({
updateData: (data: AdvancedSearchQuery) => void
) => {
const newData = { ...data };

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore-next-line I wasn't able to match the update type with the rowAspect type
// but the values match and it all works.
newData.rows[rowIndex][rowAspect] = update;
Expand Down
2 changes: 1 addition & 1 deletion src/apps/advanced-search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const advancedSearchIndexTranslations = {
"term.isbn": "advancedSearchIdentifierText"
} as const;

export type AdvancedSearchIndex = (typeof advancedSearchIndexes)[number];
export type AdvancedSearchIndex = typeof advancedSearchIndexes[number];

Check failure on line 37 in src/apps/advanced-search/types.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·advancedSearchIndexes` with `(typeof·advancedSearchIndexes)`

export type AdvancedSearchClause = {
value: "AND" | "OR" | "NOT";
Expand Down
1 change: 1 addition & 0 deletions src/apps/create-patron-user-info/CreatePatron.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default meta;
type Story = StoryObj<typeof CreatePatron>;

export const Primary: Story = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type pincodeArgTypes, serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...pincodeArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/dashboard/dashboard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import blockedArgs, {
const meta: Meta<typeof DashBoard> = {
title: "Apps / Dashboard",
component: DashBoard,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...blockedArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/demo-modal/demo-modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const meta: Meta<typeof DemoModal> = {
modal: "demo-modal-one"
}
},

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalTextArgTypes
argTypes: {
...globalTextArgTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof FavoritesListMaterialComponent> = {
title: "Apps / Favorites list material component",
component: FavoritesListMaterialComponent,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/favorites-list/FavoritesList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof FavoritesListEntry> = {
title: "Apps / Favorite list",
component: FavoritesListEntry,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/fee-list/FeeList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import renewalArgs, {
const meta: Meta<typeof FeeList> = {
title: "Apps / Fee list",
component: FeeList,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/loan-list/list/loan-list.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import blockedArgs, {
const meta: Meta<typeof LoanList> = {
title: "Apps / Loan list",
component: LoanList,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...serviceUrlArgTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MaterialGridSkeleton from "../MaterialGridSkeleton";
const meta: Meta<typeof MaterialGridAutomatic> = {
title: "Apps / Material Grid / Automatic",
component: MaterialGridAutomatic,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...globalTextArgTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const materials = [
const meta: Meta<typeof MaterialGridManual> = {
title: "Apps / Material Grid / Manual",
component: MaterialGridManual,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...globalTextArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/material-search/MaterialSearch.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const MaterialSearchHiddenInputs = ({
const meta: Meta<typeof MaterialSearchHiddenInputs> = {
title: "Apps / Material Search",
component: MaterialSearchHiddenInputs,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...globalTextArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/material/material.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof MaterialEntry> = {
title: "Apps / Material",
component: MaterialEntry,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/menu/menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const WrappedStoryHeader = withText(withUrls(withConfig(StoryHeader)));
const meta: Meta<typeof WrappedMenu> = {
title: "Apps / Header",
component: WrappedMenu,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type this
argTypes: {
...serviceUrlArgTypes,
Expand Down
6 changes: 3 additions & 3 deletions src/apps/opening-hours-editor/DialogFormEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const DialogFormEdit: React.FC<DialogFormEditProps> = ({
...cmsEvent,
// Workaround for a bug caused by the orval tool, which incorrectly requires the repetition ID.
// Ideally, the repetition ID should be optional according to the API specifications.

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unreachable code error
repetition: {
type: DplOpeningHoursListGET200ItemRepetitionType.weekly,
Expand All @@ -92,7 +92,7 @@ const DialogFormEdit: React.FC<DialogFormEditProps> = ({
} else {
// Workaround for a bug caused by the orval tool, which incorrectly requires the repetition ID.
// Ideally, the repetition ID should be optional according to the API specifications.

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unreachable code error
handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent));
closeDialog();
Expand All @@ -111,7 +111,7 @@ const DialogFormEdit: React.FC<DialogFormEditProps> = ({
} else {
// Workaround for a bug caused by the orval tool, which incorrectly requires the repetition ID.
// Ideally, the repetition ID should be optional according to the API specifications.

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unreachable code error
handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent));
closeEditDialog();
Expand Down
2 changes: 1 addition & 1 deletion src/apps/opening-hours/OpeningHours.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import OpeningHours from "./OpeningHours.entry";
const meta: Meta<typeof OpeningHours> = {
title: "Apps / Opening Hours",
component: OpeningHours,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalConfigArgTypes, globalTextArgTypes and serviceUrlArgTypes
argTypes: {
...globalConfigArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/patron-page/PatronPage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import globalConfigArgs, {
const meta: Meta<typeof PatronPage> = {
title: "Apps / Patron page",
component: PatronPage,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalConfigArgTypes, serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/recommendation/recommendation.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ManifestationMaterialType } from "../../core/utils/types/material-type"
const meta: Meta<typeof Recommendation> = {
title: "Apps / Recommendation",
component: Recommendation,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalTextArgTypes and serviceUrlArgTypes
argTypes: {
...globalTextArgTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ManifestationMaterialType } from "../../core/utils/types/material-type"
const meta: Meta<typeof RecommendedMaterial> = {
title: "Apps / Recommended Material",
component: RecommendedMaterial,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalTextArgTypes
argTypes: {
...globalTextArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/recommender/Recommender.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof Recommender> = {
title: "Apps / Recommender",
component: Recommender,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
4 changes: 2 additions & 2 deletions src/apps/reservation-list/list/reservation-list.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import globalTextArgs, {
const meta: Meta<typeof ReservationList> = {
title: "Apps / Reservation list",
component: ReservationList,

// @ts-ignore: can't figure out how to type serviceUrlArgTypes, deleteReservationModalArgTypes, reservationMaterialDetailsPropTypes, blockedArgTypes, reservationListArgTypes, globalTextArgTypes and globalTextArgTypes
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes, deleteReservationModalArgTypes, reservationMaterialDetailsPropTypes,blockedArgTypes, reservationListArgTypes, globalTextArgTypes and globalTextArgTypes
argTypes: {
// Config
...serviceUrlArgTypes,
Expand Down
4 changes: 2 additions & 2 deletions src/apps/reservation-list/modal/reservation-details/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const findEreolAccessLinkFromManifestations = (
(access) => access.__typename === "Ereol"
);
// TODO: Find out why TS doesn't understand that ereolAccess will always exist

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore-next-line
return ereolAccess?.url;
};
Expand All @@ -46,7 +46,7 @@ export const getReservationsForSaving = ({
selectedBranch: string;
}) => {
const getSelectedExpiryDate = (value: FormSelectValue) =>
typeof value === "number" ? getFutureDateString(value) : (expiryDate ?? "");
typeof value === "number" ? getFutureDateString(value) : expiryDate ?? "";

Check failure on line 49 in src/apps/reservation-list/modal/reservation-details/helper.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `expiryDate·??·""` with `(expiryDate·??·"")`
const getSelectedPickupBranch = (value: FormSelectValue) =>
typeof value === "string" ? value : selectedBranch;

Expand Down
2 changes: 1 addition & 1 deletion src/apps/search-header/search-header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import globalConfigArgs, {
const meta: Meta<typeof SearchHeaderEntry> = {
title: "Apps / Header",
component: SearchHeaderEntry,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type globalConfigArgTypes, serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/search-result/search-result.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof SearchResultEntry> = {
title: "Apps / Search Result",
component: SearchResultEntry,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/something-similar/SomethingSimilar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import globalConfigArgs, {
const meta: Meta<typeof SomethingSimilar> = {
title: "Apps / Something similar",
component: SomethingSimilar,

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: can't figure out how to type serviceUrlArgTypes and globalTextArgTypes
argTypes: {
...serviceUrlArgTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/components/facet-line/FacetLineFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const FacetLineFilters: React.FunctionComponent<FacetLineFiltersProps> = ({
// summer 2024, a lot of changes has been introduced
// which implies refactoring of facet types/functionality.
// Something here needs to be looked at.

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const facetMap = createFacetsMap(facets);

Expand Down
2 changes: 1 addition & 1 deletion src/components/guarded-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const GuardedApp = ({ app, children }: GuardedAppProps) => {

// TODO: For some reason the type is not right in the redux type system.
// It needs to be solved but I do not have the proper solution right now.

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
dispatch(reRunRequest(persistedRequest));

Expand Down
2 changes: 1 addition & 1 deletion src/core/dbc-gateway/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { beforeAll, vi } from "vitest";
import { getServiceBaseUrl } from "../utils/reduxMiddleware/extractServiceBaseUrls";
import queryMap from "./queryMap";

type Baseurl = (typeof queryMap)[keyof typeof queryMap];
type Baseurl = typeof queryMap[keyof typeof queryMap];

Check failure on line 6 in src/core/dbc-gateway/helper.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·queryMap` with `(typeof·queryMap)`

export const resolveBaseUrl = (query?: string) => {
if (!query) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ul>
*/
export type AuthenticatedPatronV6AuthenticateStatus =
(typeof AuthenticatedPatronV6AuthenticateStatus)[keyof typeof AuthenticatedPatronV6AuthenticateStatus];
typeof AuthenticatedPatronV6AuthenticateStatus[keyof typeof AuthenticatedPatronV6AuthenticateStatus];

Check failure on line 17 in src/core/fbs/model/authenticatedPatronV6AuthenticateStatus.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·AuthenticatedPatronV6AuthenticateStatus` with `(typeof·AuthenticatedPatronV6AuthenticateStatus)`

export const AuthenticatedPatronV6AuthenticateStatus = {
VALID: "VALID",
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/apiResponseCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
* 101 = Success, 105 = InvalidContentIdentifier, 118 = InvalidRequestIdentity, 120 = MaxConcurrentLoansPerBorrowerExceeded, 125 = MaxAmountPerMonthExceeded, 128 = ContentNotFound, 131 = NotLoanable, 134 = CardTemporarilyBlocked, 135 = MaxLoansOnTitleReached, 136 = InsufficientCopiesException, 137 = ReservationLimitReached, 138 = GenericFault, 139 = InvalidAgreement, 140 = AlreadyReserved, 141 = InvalidEmail, 142 = InvalidPhone, 143 = CostFreeLimitReached, 147 = CountryNotFound, 148 = InvalidInstitutionId, 149 = InvalidCardFormat, 150 = InvalidCardByCulr, 151 = CardNotFound, 152 = InvalidClientId, 153 = LoanNotFound
*/
export type ApiResponseCode =
(typeof ApiResponseCode)[keyof typeof ApiResponseCode];
typeof ApiResponseCode[keyof typeof ApiResponseCode];

Check failure on line 14 in src/core/publizon/model/apiResponseCode.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·ApiResponseCode` with `(typeof·ApiResponseCode)`

export const ApiResponseCode = {
NUMBER_101: 101,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/bookTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
/**
* 0 = Ebook, 1 = Audio
*/
export type BookTypes = (typeof BookTypes)[keyof typeof BookTypes];
export type BookTypes = typeof BookTypes[keyof typeof BookTypes];

Check failure on line 13 in src/core/publizon/model/bookTypes.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·BookTypes` with `(typeof·BookTypes)`

export const BookTypes = {
NUMBER_0: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/contentLoanStatusEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type ContentLoanStatusEnum =
(typeof ContentLoanStatusEnum)[keyof typeof ContentLoanStatusEnum];
typeof ContentLoanStatusEnum[keyof typeof ContentLoanStatusEnum];

Check failure on line 11 in src/core/publizon/model/contentLoanStatusEnum.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·ContentLoanStatusEnum` with `(typeof·ContentLoanStatusEnum)`

export const ContentLoanStatusEnum = {
NUMBER_0: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/fileExtensionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type FileExtensionType =
(typeof FileExtensionType)[keyof typeof FileExtensionType];
typeof FileExtensionType[keyof typeof FileExtensionType];

Check failure on line 11 in src/core/publizon/model/fileExtensionType.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·FileExtensionType` with `(typeof·FileExtensionType)`

export const FileExtensionType = {
NUMBER_1: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/identifierTypeEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type IdentifierTypeEnum =
(typeof IdentifierTypeEnum)[keyof typeof IdentifierTypeEnum];
typeof IdentifierTypeEnum[keyof typeof IdentifierTypeEnum];

Check failure on line 11 in src/core/publizon/model/identifierTypeEnum.ts

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Replace `typeof·IdentifierTypeEnum` with `(typeof·IdentifierTypeEnum)`

export const IdentifierTypeEnum = {
NUMBER_2: 2,
Expand Down
19 changes: 10 additions & 9 deletions src/core/utils/withFocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ export default <P extends object>(
Component: React.ComponentType<P>
): FC<P & { withFocusTrap?: boolean }> =>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
({ withFocusTrap, ...props }) => (
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);
({ withFocusTrap, ...props }) =>

Check failure on line 8 in src/core/utils/withFocusTrap.tsx

View workflow job for this annotation

GitHub Actions / Lint .js and .jsx

Delete `⏎···`
(
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);

0 comments on commit 2cd1cc6

Please sign in to comment.