1
0
Fork 0

Lint code.

This commit is contained in:
Kitteh 2021-05-25 10:47:37 +01:00
parent 44c17988e8
commit 4a3ac4f335

View file

@ -15,13 +15,13 @@ export type KVEditProps = {
type KVEditState =
| {
dataLoaded: false;
}
dataLoaded: false;
}
| {
dataLoaded: true;
kvData: Record<string, unknown>;
code: string;
};
dataLoaded: true;
kvData: Record<string, unknown>;
code: string;
};
export class KVEditor extends Component<KVEditProps, KVEditState> {
constructor() {
@ -79,11 +79,7 @@ export class KVEditor extends Component<KVEditProps, KVEditState> {
}
getStringKVData(data: Record<string, unknown>): string {
return JSON.stringify(
Object.fromEntries(sortedObjectMap(data)),
null,
4,
);
return JSON.stringify(Object.fromEntries(sortedObjectMap(data)), null, 4);
}
render(): JSX.Element {
@ -95,7 +91,7 @@ export class KVEditor extends Component<KVEditProps, KVEditState> {
<div>
<p class="uk-text-danger" id="errorText" />
<CodeJarEditor
highlight={() => { }}
highlight={() => {}}
code={this.getStringKVData(this.state.kvData)}
onUpdate={(code) => this.onCodeUpdate(code)}
options={{ tab: " ".repeat(4) }}