From 4a3ac4f335ff75c72416d7f0f3d7578d1a9a8926 Mon Sep 17 00:00:00 2001 From: Kitteh Date: Tue, 25 May 2021 10:47:37 +0100 Subject: [PATCH] Lint code. --- .../Secrets/KeyValue/KeyValueSecretsEdit.tsx | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/pages/Secrets/KeyValue/KeyValueSecretsEdit.tsx b/src/pages/Secrets/KeyValue/KeyValueSecretsEdit.tsx index bcd65b0..ad08587 100644 --- a/src/pages/Secrets/KeyValue/KeyValueSecretsEdit.tsx +++ b/src/pages/Secrets/KeyValue/KeyValueSecretsEdit.tsx @@ -15,13 +15,13 @@ export type KVEditProps = { type KVEditState = | { - dataLoaded: false; - } + dataLoaded: false; + } | { - dataLoaded: true; - kvData: Record; - code: string; - }; + dataLoaded: true; + kvData: Record; + code: string; + }; export class KVEditor extends Component { constructor() { @@ -79,11 +79,7 @@ export class KVEditor extends Component { } getStringKVData(data: Record): 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 {

{ }} + highlight={() => {}} code={this.getStringKVData(this.state.kvData)} onUpdate={(code) => this.onCodeUpdate(code)} options={{ tab: " ".repeat(4) }}