Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency prettier to v3.2.4 #299

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.0.3-sdk",
"version": "3.2.4-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"jest-fail-on-console": "3.1.1",
"lint-staged": "15.2.0",
"msw": "1.3.2",
"prettier": "3.0.3",
"prettier": "3.2.4",
"react-beautiful-dnd-test-utils": "4.1.1",
"serve": "14.2.0",
"serve-static": "1.15.0",
Expand Down
80 changes: 40 additions & 40 deletions src/api/channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,46 +183,46 @@
);
}
: isChannelMetadataWaveform(channel)
? ({ row, getValue }) => {
const value = getValue<string>();
return (
<TraceOrImageThumbnail
base64Data={value}
alt={`${channel.name ?? channel.systemName} ${
channel.type
} for timestamp ${row.getValue(timeChannelName)}`}
onClick={() =>
dispatch(
openTraceWindow({
recordId: (row.original as RecordRow)['_id'],
channelName: channel.systemName,
})
)
}
/>
);
}
: isChannelMetadataImage(channel)
? ({ row, getValue }) => {
const value = getValue<string>();
return (
<TraceOrImageThumbnail
base64Data={value}
alt={`${channel.name ?? channel.systemName} ${
channel.type
} for timestamp ${row.getValue(timeChannelName)}`}
onClick={() =>
dispatch(
openImageWindow({
recordId: (row.original as RecordRow)['_id'],
channelName: channel.systemName,
})
)
}
/>
);
}
: undefined,
? ({ row, getValue }) => {
const value = getValue<string>();
return (
<TraceOrImageThumbnail
base64Data={value}
alt={`${channel.name ?? channel.systemName} ${
channel.type
} for timestamp ${row.getValue(timeChannelName)}`}
onClick={() =>
dispatch(
openTraceWindow({
recordId: (row.original as RecordRow)['_id'],
channelName: channel.systemName,
})
)
}
/>
);
}
: isChannelMetadataImage(channel)
? ({ row, getValue }) => {
const value = getValue<string>();
return (
<TraceOrImageThumbnail
base64Data={value}
alt={`${channel.name ?? channel.systemName} ${
channel.type
} for timestamp ${row.getValue(timeChannelName)}`}
onClick={() =>
dispatch(

Check warning on line 215 in src/api/channels.tsx

View check run for this annotation

Codecov / codecov/patch

src/api/channels.tsx#L215

Added line #L215 was not covered by tests
openImageWindow({
recordId: (row.original as RecordRow)['_id'],
channelName: channel.systemName,
})
)
}
/>
);
}
: undefined,

Check warning on line 225 in src/api/channels.tsx

View check run for this annotation

Codecov / codecov/patch

src/api/channels.tsx#L225

Added line #L225 was not covered by tests
});

myColumnDefs.push(newColumnDef);
Expand Down
8 changes: 4 additions & 4 deletions src/api/records.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ const fetchRecords = async (
existsConditions.length > 0 && searchObj.length > 0
? { $and: searchObj, $or: existsConditions }
: existsConditions.length > 0
? { $or: existsConditions }
: { $and: searchObj };
? { $or: existsConditions }
: { $and: searchObj };

queryParams.append('conditions', JSON.stringify(query));
}
Expand Down Expand Up @@ -161,8 +161,8 @@ const fetchRecordCountQuery = (
existsConditions.length > 0 && searchObj.length > 0
? { $and: searchObj, $or: existsConditions }
: existsConditions.length > 0
? { $or: existsConditions }
: { $and: searchObj };
? { $or: existsConditions }
: { $and: searchObj };

queryParams.append('conditions', JSON.stringify(query));
}
Expand Down
5 changes: 3 additions & 2 deletions src/filtering/filterParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ class TokenInput {
return this.tokens[this.pos++];
} else {
throw new ParserError(
`Expected token from types [${types}] at token ${this.peek(0)
?.value}` // TODO: better error message?
`Expected token from types [${types}] at token ${
this.peek(0)?.value
}` // TODO: better error message?
);
}
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/images/falseColourPanel.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ const FalseColourPanel = (props: FalseColourPanelProps) => {
? !reverseColour
? newValue
: colourMapsList?.includes(`${newValue}_r`)
? `${newValue}_r`
: newValue
? `${newValue}_r`
: newValue
: undefined
);
};
Expand All @@ -211,8 +211,8 @@ const FalseColourPanel = (props: FalseColourPanelProps) => {
?.filter((colourmap) => colourmap?.endsWith('_r'))
.map((colourmap) => colourmap?.replace('_r', ''));

const colourMapsWithReverse = colourMapsNames?.filter(
(value) => colourMapsReverseNames?.includes(value)
const colourMapsWithReverse = colourMapsNames?.filter((value) =>
colourMapsReverseNames?.includes(value)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/plotting/plot.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ const Plot = (props: PlotProps) => {
lineStyle === 'dashed'
? [5, 5]
: lineStyle === 'dotted'
? [0, 5]
: undefined,
? [0, 5]
: undefined,
pointRadius: lineStyle === 'dotted' ? 3 : undefined,
borderCapStyle: lineStyle === 'dotted' ? 'round' : undefined,
} satisfies ChartDataset<PlotType, PlotDataset['data']>;
Expand Down
8 changes: 4 additions & 4 deletions src/search/components/shotNumber.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ const ShotNumber = (props: ShotNumberProps): React.ReactElement => {
{min !== undefined && max === undefined
? `Minimum: ${min}`
: min === undefined && max !== undefined
? `Maximum: ${max}`
: min !== undefined && max !== undefined
? `${min} to ${max}`
: 'Select'}
? `Maximum: ${max}`
: min !== undefined && max !== undefined
? `${min} to ${max}`
: 'Select'}
</Typography>
</div>
</Box>
Expand Down
8 changes: 4 additions & 4 deletions src/settingsMenuItems.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
?.filter((colourmap) => colourmap?.endsWith('_r'))
.map((colourmap) => colourmap?.replace('_r', ''));

const colourMapsWithReverse = colourMapsNames?.filter(
(value) => colourMapsReverseNames?.includes(value)
const colourMapsWithReverse = colourMapsNames?.filter((value) =>
colourMapsReverseNames?.includes(value)
);

const queryClient = useQueryClient();
Expand Down Expand Up @@ -115,8 +115,8 @@
? !reverseColour
? newValue
: colourMapsList?.includes(`${newValue}_r`)
? `${newValue}_r`
: newValue
? `${newValue}_r`
: newValue

Check warning on line 119 in src/settingsMenuItems.component.tsx

View check run for this annotation

Codecov / codecov/patch

src/settingsMenuItems.component.tsx#L118-L119

Added lines #L118 - L119 were not covered by tests
: null,
});
};
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12391,7 +12391,7 @@ __metadata:
lint-staged: "npm:15.2.0"
loglevel: "npm:1.9.1"
msw: "npm:1.3.2"
prettier: "npm:3.0.3"
prettier: "npm:3.2.4"
prop-types: "npm:15.8.1"
react: "npm:18.2.0"
react-beautiful-dnd: "npm:13.1.1"
Expand Down Expand Up @@ -13664,12 +13664,12 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:3.0.3":
version: 3.0.3
resolution: "prettier@npm:3.0.3"
"prettier@npm:3.2.4":
version: 3.2.4
resolution: "prettier@npm:3.2.4"
bin:
prettier: bin/prettier.cjs
checksum: ccf1ead9794b017be6b42d0873f459070beef2069eb393c8b4c0d11aa3430acefc54f6d5f44a5b7ce9af05ad8daf694b912f0aa2808d1c22dfa86e61e9d563f8
checksum: e2b735d0552501b3a7ac8bd3ba3b6de2920bb35bd4cd02d08cb9057ebe3e96d83b9a7e4b903d987b7530a50223b12c74d107c154337236ae2c68156ba1e65cd2
languageName: node
linkType: hard

Expand Down
Loading