Skip to content

Commit c7c6283

Browse files
authored
Clean up Knip issues (#6441)
1 parent e5a6dbd commit c7c6283

16 files changed

Lines changed: 14 additions & 105 deletions

File tree

.knip.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"enumMembers": "off",
66
"files": "warn",
77
"exports": "warn",
8-
"duplicates": "warn",
8+
"duplicates": "off",
99
"classMembers": "warn",
1010
"nsTypes": "warn",
1111
"unresolved": "warn",
@@ -24,7 +24,8 @@
2424
"src/**/fragments/*.ts",
2525
"src/searches/*.ts",
2626
"src/**/fixtures.ts",
27-
"scripts/**"
27+
"scripts/**",
28+
"storybookUtils/**"
2829
],
2930
"project": ["**/*.{js,ts,tsx,jsx}"],
3031
"jest": true,

jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const config = {
3232
"@dashboard(.*)$": "<rootDir>/src/$1",
3333
"@test/(.*)$": "<rootDir>/testUtils/$1",
3434
"^@material-ui/core$": "<rootDir>/node_modules/@material-ui/core",
35-
"^@material-ui/icons$": "<rootDir>/node_modules/@material-ui/icons",
3635
"^@material-ui/styles$": "<rootDir>/node_modules/@material-ui/styles",
3736
"^react$": "<rootDir>/node_modules/react",
3837
"^react-dom$": "<rootDir>/node_modules/react-dom",

src/channels/components/ChannelForm/automatic-checkout-complete/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { type IntlShape } from "react-intl";
22

3-
export type RelativeTimeUnit = "day" | "hour" | "minute";
3+
type RelativeTimeUnit = "day" | "hour" | "minute";
44

5-
export interface RelativeTimeValue {
5+
interface RelativeTimeValue {
66
value: number;
77
unit: RelativeTimeUnit;
88
}

src/components/Attributes/utils.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ import { getEntityUrl } from "@dashboard/utils/maps";
1313
import { type Option } from "@saleor/macaw-ui-next";
1414
import { type IntlShape } from "react-intl";
1515

16-
export function getSingleChoices(values: AttributeValueFragment[]): Option[] {
17-
return values.map(value => ({
18-
label: value.name,
19-
value: value.slug,
20-
}));
21-
}
22-
2316
export function getFileChoice(attribute: AttributeInput): FileChoiceType {
2417
const attributeValue = attribute.value?.length > 0 && attribute.value[0];
2518
const definedAttributeValue = attribute.data.values.find(

src/components/ConditionalFilter/controlsType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type ConditionValue } from "./FilterElement/ConditionValue";
22

3-
export const CONTROL_DEFAULTS = {
3+
const CONTROL_DEFAULTS = {
44
text: "",
55
number: "",
66
"number.range": ["", ""] as [string, string],

src/components/ModalFilters/useUrlFilterStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const isFilterKey = (key: string): boolean => /^\d+$/.test(key);
99
const stripLeadingQuestionMark = (search: string): string =>
1010
search.startsWith("?") ? search.slice(1) : search;
1111

12-
export interface FilterUrlState {
12+
interface FilterUrlState {
1313
search: string;
1414
filterParams: Record<string, unknown>;
1515
preservedParams: Record<string, unknown>;

src/components/Pill/Pill.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const useStyles = makeStyles(
2727
{ name: "Pill" },
2828
);
2929

30-
export interface CustomPillProps extends Omit<PillProps, "color"> {
30+
interface CustomPillProps extends Omit<PillProps, "color"> {
3131
color: PillStatusType;
3232
}
3333

src/components/Timeline/TimelineEvent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const eventIconMap: Partial<Record<OrderEventsEnum, IconComponent>> = {
137137
[OrderEventsEnum.OTHER]: CircleIcon,
138138
};
139139

140-
export interface TimelineEventProps {
140+
interface TimelineEventProps {
141141
children?: React.ReactNode;
142142
date: string | React.ReactNode;
143143
title?: React.ReactNode;

src/extensions/domain/app-extension-manifest-options.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ export const appExtensionManifestOptionsSchemaWithDefault =
3636
method: "POST",
3737
},
3838
});
39-
40-
export type AppExtensionManifestOptions = z.infer<typeof appExtensionManifestOptionsSchema>;

src/extensions/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ export const extensionsResponseSchema = z.object({
5050

5151
export type ExtensionData = z.infer<typeof extensionDataSchema>;
5252
export type ExtensionCategory = z.infer<typeof extensionCategorySchema>;
53-
export type ExtensionsResponse = z.infer<typeof extensionsResponseSchema>;

0 commit comments

Comments
 (0)