chore: upgrade prettier and fix linting errors

This commit is contained in:
Björn Dalfors
2024-03-07 14:34:12 +01:00
parent d1de0770f2
commit f25cab4682
36 changed files with 644 additions and 388 deletions

View File

@@ -43,9 +43,9 @@ class CodeDiff extends React.PureComponent<Props, State> {
private plottableLiteralsIndexedWithLineNumbers() {
const allLiterals = this.isValidJson(this.props.current) ? literalsMappedByLines(this.props.current) || [] : []
return allLiterals.map((l: JsonPropertyLocation) => (isPlottable(l.value) ? l : undefined)) as Array<
JsonPropertyLocation
>
return allLiterals.map((l: JsonPropertyLocation) =>
isPlottable(l.value) ? l : undefined
) as Array<JsonPropertyLocation>
}
private renderStyledCodeLines(changes: Array<Diff.Change>) {

View File

@@ -83,10 +83,12 @@ class ValueRenderer extends React.Component<Props, State> {
}
public render() {
return <div style={{ padding: '0px 0px 8px 0px', width: '100%' }}>
{this.props.message?.payload?.decoder === Decoder.SPARKPLUG && "Decoded SparkplugB"}
{this.renderValue()}
</div>
return (
<div style={{ padding: '0px 0px 8px 0px', width: '100%' }}>
{this.props.message?.payload?.decoder === Decoder.SPARKPLUG && 'Decoded SparkplugB'}
{this.renderValue()}
</div>
)
}
public renderValue() {