Skip to content

Commit fa4a413

Browse files
committed
style: format prettier with object wrapping set to collapse
1 parent b41c9e0 commit fa4a413

File tree

80 files changed

+146
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+146
-529
lines changed

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"bracketSpacing": true,
88
"bracketSameLine": false,
99
"useTabs": false,
10-
"tabWidth": 2
10+
"tabWidth": 2,
11+
"objectWrap": "collapse"
1112
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseCard.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ export interface BaseCardProps {
4848
* String values to be displayed in the header section of the card. Only title is required.
4949
* Missing values are not displayed.
5050
*/
51-
header?: {
52-
title: string;
53-
subtitle?: string;
54-
avatar?: string;
55-
color?: string;
56-
};
51+
header?: { title: string; subtitle?: string; avatar?: string; color?: string };
5752
}
5853

5954
/**
@@ -85,10 +80,7 @@ export const BaseCard = ({
8580
{header.avatar?.[0].toUpperCase()}
8681
</Avatar>
8782
}
88-
slotProps={{
89-
subheader: { variant: "subtitle1" },
90-
title: { variant: "body1" },
91-
}}
83+
slotProps={{ subheader: { variant: "subtitle1" }, title: { variant: "body1" } }}
9284
subheader={header.subtitle}
9385
title={header.title}
9486
/>

src/components/CreateDatasetStorageSubscription.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ export interface CreateDatasetStorageSubscriptionProps {
1919
unit: UnitAllDetail;
2020
}
2121

22-
const initialValues = {
23-
allowance: 1000,
24-
name: "Dataset Storage",
25-
};
22+
const initialValues = { allowance: 1000, name: "Dataset Storage" };
2623

2724
export const CreateDatasetStorageSubscription = ({
2825
unit,
@@ -34,10 +31,12 @@ export const CreateDatasetStorageSubscription = ({
3431
return (
3532
<Formik
3633
initialValues={initialValues}
37-
validationSchema={yup.object().shape({
38-
name: yup.string().trim().required("A name is required"),
39-
allowance: yup.number().min(1).integer().required("An allowance is required"),
40-
})}
34+
validationSchema={yup
35+
.object()
36+
.shape({
37+
name: yup.string().trim().required("A name is required"),
38+
allowance: yup.number().min(1).integer().required("An allowance is required"),
39+
})}
4140
onSubmit={async ({ allowance, name }) => {
4241
try {
4342
await createProduct({

src/components/DataTable/DataTable.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ const fuzzyFilter: FilterFn<any> = (row, columnId, value, addMeta) => {
126126
const itemRank = rankItem(row.getValue(columnId), value);
127127

128128
// Store the itemRank info
129-
addMeta({
130-
itemRank,
131-
});
129+
addMeta({ itemRank });
132130

133131
// Return if the item should be filtered in/out
134132
return itemRank.passed;
@@ -224,16 +222,8 @@ export const DataTable = <Data extends Record<string, any>>(props: DataTableProp
224222
getRowId,
225223
data: tableData,
226224
columns: paddedColumns,
227-
filterFns: {
228-
fuzzy: fuzzyFilter,
229-
},
230-
state: {
231-
sorting,
232-
globalFilter,
233-
columnFilters,
234-
expanded,
235-
rowSelection,
236-
},
225+
filterFns: { fuzzy: fuzzyFilter },
226+
state: { sorting, globalFilter, columnFilters, expanded, rowSelection },
237227
initialState: {
238228
rowSelection: initialSelection
239229
? Object.fromEntries(initialSelection.map((id) => [id, true]))

src/components/FileSelector/AllFilesList.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ export const AllFilesList = ({
2626
const [breadcrumbs, setBreadcrumbs] = useState<string[]>([]);
2727
const subPath = "/" + breadcrumbs.join("/");
2828

29-
const { data, isLoading } = useGetFiles({
30-
project_id: projectId,
31-
path: subPath,
32-
});
29+
const { data, isLoading } = useGetFiles({ project_id: projectId, path: subPath });
3330

3431
const files =
3532
data?.files.filter((file) => !file.mime_type || mimeTypes?.includes(file.mime_type)) ?? [];

src/components/HorizontalList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ export const HorizontalList = styled(List)({
88
display: "flex",
99
flexDirection: "row",
1010
flexWrap: "wrap",
11-
"& > li": {
12-
width: "auto",
13-
},
11+
"& > li": { width: "auto" },
1412
});

src/components/MolCard/DepictMolecule.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,11 @@ interface DepictMoleculePropsBase {
3030
}
3131

3232
export type DepictVariants =
33-
| {
34-
variant: "molFile";
35-
molFile: string;
36-
}
37-
| {
38-
variant: "smiles";
39-
smiles: string;
40-
};
33+
| { variant: "molFile"; molFile: string }
34+
| { variant: "smiles"; smiles: string };
4135

4236
export type DepictMoleculeProps = DepictMoleculePropsBase &
43-
DepictVariants & {
44-
depictParams: DepictParameters;
45-
};
37+
DepictVariants & { depictParams: DepictParameters };
4638

4739
type ImageProps = Omit<ComponentProps<"img">, "src">;
4840

src/components/ViewFilePopover/FilePlainTextViewerListItem.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ export const FilePlainTextViewerListItem = ({
2727
passHref
2828
href={{
2929
pathname: "/project/file",
30-
query: {
31-
project: router.query.project,
32-
file: fileName,
33-
path,
34-
},
30+
query: { project: router.query.project, file: fileName, path },
3531
}}
3632
>
3733
<ListItemButton

src/components/ViewFilePopover/SDFViewerListItem.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ export const SDFViewerListItem = ({ fileName, path, onClick }: SDFViewerListItem
2525
passHref
2626
href={{
2727
pathname: "/viewer/sdf",
28-
query: {
29-
project: router.query.project,
30-
file: fileName,
31-
path,
32-
},
28+
query: { project: router.query.project, file: fileName, path },
3329
}}
3430
>
3531
<ListItemButton

0 commit comments

Comments
 (0)