From 957c0fadea2a8f4651a9e98a07361b1751d670e0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:51:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../src/stories/FileSystemSelector.js | 31 ++++++++++++++----- .../src/stories/FileSystemSelector.stories.js | 4 +-- src/renderer/src/stories/JSONSchemaInput.js | 1 - 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/renderer/src/stories/FileSystemSelector.js b/src/renderer/src/stories/FileSystemSelector.js index 2d07756e0..81967a6ad 100644 --- a/src/renderer/src/stories/FileSystemSelector.js +++ b/src/renderer/src/stories/FileSystemSelector.js @@ -150,14 +150,17 @@ export class FilesystemSelector extends LitElement { return; } - const resolvedValueDisplay = (isArray + const resolvedValueDisplay = isArray ? len > 1 ? `${this.value[0]} and ${len - 1} other${len > 2 ? "s" : ""}` : this.value[0] - : this.value) + : this.value; - - const objectTypeReference = this.multiple ? this.type === 'directory' ? 'directories' : 'files' : `a ${this.type}` + const objectTypeReference = this.multiple + ? this.type === "directory" + ? "directories" + : "files" + : `a ${this.type}`; return html` `; } diff --git a/src/renderer/src/stories/FileSystemSelector.stories.js b/src/renderer/src/stories/FileSystemSelector.stories.js index 68fdc3d66..035d61938 100644 --- a/src/renderer/src/stories/FileSystemSelector.stories.js +++ b/src/renderer/src/stories/FileSystemSelector.stories.js @@ -13,10 +13,10 @@ Folder.args = { }; export const FileMultiple = Template.bind({}); -FileMultiple.args = { multiple: true } +FileMultiple.args = { multiple: true }; export const FolderMultiple = Template.bind({}); FolderMultiple.args = { type: "directory", - multiple: true + multiple: true, }; diff --git a/src/renderer/src/stories/JSONSchemaInput.js b/src/renderer/src/stories/JSONSchemaInput.js index 536ff8654..f87a96b94 100644 --- a/src/renderer/src/stories/JSONSchemaInput.js +++ b/src/renderer/src/stories/JSONSchemaInput.js @@ -267,7 +267,6 @@ export class JSONSchemaInput extends LitElement { } else if (info.type === "string" || info.type === "number") { const fileSystemFormat = isFilesystemSelector(info.format); if (fileSystemFormat) return createFilesystemSelector(fileSystemFormat); - // Handle long string formats else if (info.format === "long" || isArray) return html`