Merge pull request #8 from wavetermdev/evan/fix-formatting

Fix prettier formatting
This commit is contained in:
Mike Sawka 2024-05-28 12:14:25 -07:00 committed by GitHub
commit 6e6b5178c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 13225 additions and 249 deletions

View File

@ -6,5 +6,5 @@ insert_final_newline = true
[*.{js,jsx,ts,tsx,json,yml,css,less}] [*.{js,jsx,ts,tsx,json,yml,css,less}]
charset = utf-8 charset = utf-8
indent_style = tab indent_style = space
indent_size = 4 indent_size = 4

View File

@ -1,12 +1,7 @@
// @ts-check // @ts-check
import eslint from '@eslint/js'; import eslint from "@eslint/js";
import tseslint from 'typescript-eslint'; import eslintConfigPrettier from "eslint-config-prettier";
import eslintConfigPrettier from 'eslint-config-prettier'; import tseslint from "typescript-eslint";
export default export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, eslintConfigPrettier);
tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier
);

View File

@ -1,12 +1,10 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react"; import { Workspace } from "@/app/workspace/workspace";
import { atoms, globalStore } from "@/store/global";
import * as jotai from "jotai"; import * as jotai from "jotai";
import { Provider } from "jotai"; import { Provider } from "jotai";
import { clsx } from "clsx";
import { Workspace } from "@/app/workspace/workspace";
import { globalStore, atoms } from "@/store/global";
import "../../public/style.less"; import "../../public/style.less";
import { CenteredDiv } from "./element/quickelems"; import { CenteredDiv } from "./element/quickelems";

View File

@ -1,13 +1,12 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import * as jotai from "jotai";
import * as WOS from "@/store/wos";
import { TerminalView } from "@/app/view/term";
import { PreviewView } from "@/app/view/preview";
import { PlotView } from "@/app/view/plotview"; import { PlotView } from "@/app/view/plotview";
import { PreviewView } from "@/app/view/preview";
import { TerminalView } from "@/app/view/term";
import { CenteredDiv } from "@/element/quickelems"; import { CenteredDiv } from "@/element/quickelems";
import * as WOS from "@/store/wos";
import * as React from "react";
import "./block.less"; import "./block.less";

View File

@ -1,8 +1,8 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import { clsx } from "clsx"; import { clsx } from "clsx";
import * as React from "react";
import "./button.less"; import "./button.less";

View File

@ -1,9 +1,9 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import React from "react";
import { createColumnHelper, flexRender, getCoreRowModel, useReactTable, Table } from "@tanstack/react-table";
import { FileInfo } from "@/bindings/fileservice"; import { FileInfo } from "@/bindings/fileservice";
import { Table, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
import React from "react";
import "./directorytable.less"; import "./directorytable.less";

View File

@ -1,10 +1,9 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react"; import { clsx } from "clsx";
import ReactMarkdown from "react-markdown"; import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import { clsx } from "clsx";
import "./markdown.less"; import "./markdown.less";

View File

@ -1,8 +1,8 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import React from "react";
import { Button } from "@/element/button"; import { Button } from "@/element/button";
import React from "react";
import "./modal.less"; import "./modal.less";

View File

@ -1,9 +1,9 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { Events } from "@wailsio/runtime";
import * as jotai from "jotai"; import * as jotai from "jotai";
import * as rxjs from "rxjs"; import * as rxjs from "rxjs";
import { Events } from "@wailsio/runtime";
import * as WOS from "./wos"; import * as WOS from "./wos";
const globalStore = jotai.createStore(); const globalStore = jotai.createStore();
@ -107,4 +107,4 @@ function useBlockAtom<T>(blockId: string, name: string, makeFn: () => jotai.Atom
return atom as jotai.Atom<T>; return atom as jotai.Atom<T>;
} }
export { globalStore, atoms, getBlockSubject, useBlockAtom, WOS }; export { WOS, atoms, getBlockSubject, globalStore, useBlockAtom };

View File

@ -3,11 +3,10 @@
// WaveObjectStore // WaveObjectStore
import * as React from "react"; import { Call as $Call, Events } from "@wailsio/runtime";
import * as jotai from "jotai"; import * as jotai from "jotai";
import { Events } from "@wailsio/runtime"; import * as React from "react";
import { Call as $Call } from "@wailsio/runtime"; import { atoms, globalStore } from "./global";
import { globalStore, atoms } from "./global";
type WaveObjectDataItemType<T extends WaveObj> = { type WaveObjectDataItemType<T extends WaveObj> = {
value: T; value: T;
@ -274,14 +273,14 @@ export function CloseTab(tabId: string): Promise<void> {
} }
export { export {
cleanWaveObjectCache,
clearWaveObjectCache,
getStaticObjectValue,
loadAndPinWaveObject,
makeORef, makeORef,
updateWaveObject,
updateWaveObjects,
useWaveObject, useWaveObject,
useWaveObjectValue, useWaveObjectValue,
useWaveObjectValueWithSuspense, useWaveObjectValueWithSuspense,
loadAndPinWaveObject,
clearWaveObjectCache,
updateWaveObject,
updateWaveObjects,
cleanWaveObjectCache,
getStaticObjectValue,
}; };

View File

@ -1,14 +1,11 @@
// Copyright 2023, Command Line Inc. // Copyright 2023, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import * as jotai from "jotai";
import { Block } from "@/app/block/block"; import { Block } from "@/app/block/block";
import { atoms } from "@/store/global";
import * as WOS from "@/store/wos"; import * as WOS from "@/store/wos";
import "./tab.less";
import { CenteredDiv, CenteredLoadingDiv } from "../element/quickelems"; import { CenteredDiv, CenteredLoadingDiv } from "../element/quickelems";
import "./tab.less";
const TabContent = ({ tabId }: { tabId: string }) => { const TabContent = ({ tabId }: { tabId: string }) => {
const [tabData, tabLoading] = WOS.useWaveObjectValue<Tab>(WOS.makeORef("tab", tabId)); const [tabData, tabLoading] = WOS.useWaveObjectValue<Tab>(WOS.makeORef("tab", tabId));

View File

@ -1,8 +1,8 @@
import * as React from "react";
import * as Plot from "@observablehq/plot";
import * as d3 from "d3";
import { Button } from "@/element/button"; import { Button } from "@/element/button";
import { WaveModal } from "@/element/modal"; import { WaveModal } from "@/element/modal";
import * as Plot from "@observablehq/plot";
import * as d3 from "d3";
import * as React from "react";
import "./plotview.less"; import "./plotview.less";

View File

@ -1,18 +1,16 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react"; import { FileInfo, FileService, FullFile } from "@/bindings/fileservice";
import * as jotai from "jotai";
import { atoms, useBlockAtom } from "@/store/global";
import { Markdown } from "@/element/markdown";
import { FileService, FileInfo, FullFile } from "@/bindings/fileservice";
import * as util from "@/util/util";
import { CenteredDiv } from "../element/quickelems";
import { DirectoryTable } from "@/element/directorytable"; import { DirectoryTable } from "@/element/directorytable";
import { Markdown } from "@/element/markdown";
import { useBlockAtom } from "@/store/global";
import * as WOS from "@/store/wos"; import * as WOS from "@/store/wos";
import * as util from "@/util/util";
import * as jotai from "jotai";
import { CenteredDiv } from "../element/quickelems";
import "./view.less"; import "./view.less";
import { first } from "rxjs";
const MaxFileSize = 1024 * 1024 * 10; // 10MB const MaxFileSize = 1024 * 1024 * 10; // 10MB

View File

@ -1,15 +1,13 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import * as jotai from "jotai";
import { Terminal } from "@xterm/xterm";
import type { ITheme } from "@xterm/xterm";
import { FitAddon } from "@xterm/addon-fit";
import { Button } from "@/element/button";
import { BlockService } from "@/bindings/blockservice"; import { BlockService } from "@/bindings/blockservice";
import { getBlockSubject } from "@/store/global"; import { getBlockSubject } from "@/store/global";
import { base64ToArray } from "@/util/util"; import { base64ToArray } from "@/util/util";
import { FitAddon } from "@xterm/addon-fit";
import type { ITheme } from "@xterm/xterm";
import { Terminal } from "@xterm/xterm";
import * as React from "react";
import "./view.less"; import "./view.less";
import "/public/xterm.css"; import "/public/xterm.css";

View File

@ -1,13 +1,12 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import * as jotai from "jotai";
import { TabContent } from "@/app/tab/tab"; import { TabContent } from "@/app/tab/tab";
import { clsx } from "clsx";
import { atoms } from "@/store/global"; import { atoms } from "@/store/global";
import * as WOS from "@/store/wos"; import * as WOS from "@/store/wos";
import { CenteredLoadingDiv, CenteredDiv } from "../element/quickelems"; import { clsx } from "clsx";
import * as jotai from "jotai";
import { CenteredDiv } from "../element/quickelems";
import "./workspace.less"; import "./workspace.less";

View File

@ -22,4 +22,4 @@ function base64ToArray(b64: string): Uint8Array {
return rtnArr; return rtnArr;
} }
export { base64ToString, stringToBase64, base64ToArray }; export { base64ToArray, base64ToString, stringToBase64 };

View File

@ -1,18 +1,12 @@
// Copyright 2024, Command Line Inc. // Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { Client } from "@/gopkg/wstore";
import * as WOS from "@/store/wos";
import * as React from "react"; import * as React from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import { App } from "./app/app"; import { App } from "./app/app";
import { loadFonts } from "./util/fontutil"; import { loadFonts } from "./util/fontutil";
import { ClientService } from "@/bindings/clientservice";
import { Client } from "@/gopkg/wstore";
import { globalStore, atoms } from "@/store/global";
import * as WOS from "@/store/wos";
import * as wailsRuntime from "@wailsio/runtime";
import * as wstore from "@/gopkg/wstore";
import * as gdata from "@/store/global";
import { immerable } from "immer";
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const windowId = urlParams.get("windowid"); const windowId = urlParams.get("windowid");

View File

@ -2,8 +2,6 @@
export default { export default {
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"], plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120, printWidth: 120,
tabWidth: 4,
useTabs: true,
trailingComma: "es5", trailingComma: "es5",
jsdocVerticalAlignment: true, jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true, jsdocSeparateReturnsFromParam: true,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,4 +3,21 @@
* License - https://fontawesome.com/license (Commercial License) * License - https://fontawesome.com/license (Commercial License)
* Copyright 2023 Fonticons, Inc. * Copyright 2023 Fonticons, Inc.
*/ */
:host,:root{--fa-style-family-sharp:"Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp"}@font-face{font-family:"Font Awesome 6 Sharp";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-sharp-regular-400.woff2) format("woff2"),url(../webfonts/fa-sharp-regular-400.ttf) format("truetype")}.fa-regular,.fasr{font-weight:400} :host,
:root {
--fa-style-family-sharp: "Font Awesome 6 Sharp";
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
}
@font-face {
font-family: "Font Awesome 6 Sharp";
font-style: normal;
font-weight: 400;
font-display: block;
src:
url(../webfonts/fa-sharp-regular-400.woff2) format("woff2"),
url(../webfonts/fa-sharp-regular-400.ttf) format("truetype");
}
.fa-regular,
.fasr {
font-weight: 400;
}

View File

@ -3,4 +3,21 @@
* License - https://fontawesome.com/license (Commercial License) * License - https://fontawesome.com/license (Commercial License)
* Copyright 2023 Fonticons, Inc. * Copyright 2023 Fonticons, Inc.
*/ */
:host,:root{--fa-style-family-sharp:"Font Awesome 6 Sharp";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp"}@font-face{font-family:"Font Awesome 6 Sharp";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-sharp-solid-900.woff2) format("woff2"),url(../webfonts/fa-sharp-solid-900.ttf) format("truetype")}.fa-solid,.fass{font-weight:900} :host,
:root {
--fa-style-family-sharp: "Font Awesome 6 Sharp";
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
}
@font-face {
font-family: "Font Awesome 6 Sharp";
font-style: normal;
font-weight: 900;
font-display: block;
src:
url(../webfonts/fa-sharp-solid-900.woff2) format("woff2"),
url(../webfonts/fa-sharp-solid-900.ttf) format("truetype");
}
.fa-solid,
.fass {
font-weight: 900;
}

View File

@ -3,4 +3,21 @@
* License - https://fontawesome.com/license (Commercial License) * License - https://fontawesome.com/license (Commercial License)
* Copyright 2023 Fonticons, Inc. * Copyright 2023 Fonticons, Inc.
*/ */
:host,:root{--fa-style-family-classic:"Font Awesome 6 Pro";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Pro"}@font-face{font-family:"Font Awesome 6 Pro";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900} :host,
:root {
--fa-style-family-classic: "Font Awesome 6 Pro";
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Pro";
}
@font-face {
font-family: "Font Awesome 6 Pro";
font-style: normal;
font-weight: 900;
font-display: block;
src:
url(../webfonts/fa-solid-900.woff2) format("woff2"),
url(../webfonts/fa-solid-900.ttf) format("truetype");
}
.fa-solid,
.fas {
font-weight: 900;
}

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<base href="../" /> <base href="../" />

View File

@ -79,7 +79,7 @@
.xterm .composition-view { .xterm .composition-view {
/* TODO: Composition position got messed up somewhere */ /* TODO: Composition position got messed up somewhere */
background: #000; background: #000;
color: #FFF; color: #fff;
display: none; display: none;
position: absolute; position: absolute;
white-space: nowrap; white-space: nowrap;
@ -175,21 +175,41 @@
opacity: 1 !important; opacity: 1 !important;
} }
.xterm-underline-1 { text-decoration: underline; } .xterm-underline-1 {
.xterm-underline-2 { text-decoration: double underline; } text-decoration: underline;
.xterm-underline-3 { text-decoration: wavy underline; } }
.xterm-underline-4 { text-decoration: dotted underline; } .xterm-underline-2 {
.xterm-underline-5 { text-decoration: dashed underline; } text-decoration: double underline;
}
.xterm-underline-3 {
text-decoration: wavy underline;
}
.xterm-underline-4 {
text-decoration: dotted underline;
}
.xterm-underline-5 {
text-decoration: dashed underline;
}
.xterm-overline { .xterm-overline {
text-decoration: overline; text-decoration: overline;
} }
.xterm-overline.xterm-underline-1 { text-decoration: overline underline; } .xterm-overline.xterm-underline-1 {
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; } text-decoration: overline underline;
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; } }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; } .xterm-overline.xterm-underline-2 {
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; } text-decoration: overline double underline;
}
.xterm-overline.xterm-underline-3 {
text-decoration: overline wavy underline;
}
.xterm-overline.xterm-underline-4 {
text-decoration: overline dotted underline;
}
.xterm-overline.xterm-underline-5 {
text-decoration: overline dashed underline;
}
.xterm-strikethrough { .xterm-strikethrough {
text-decoration: line-through; text-decoration: line-through;

View File

@ -20,7 +20,7 @@
"@/store/*": ["frontend/app/store/*"], "@/store/*": ["frontend/app/store/*"],
"@/element/*": ["frontend/app/element/*"], "@/element/*": ["frontend/app/element/*"],
"@/bindings/*": ["frontend/bindings/github.com/wavetermdev/thenextwave/pkg/service/*"], "@/bindings/*": ["frontend/bindings/github.com/wavetermdev/thenextwave/pkg/service/*"],
"@/gopkg/*": ["frontend/bindings/github.com/wavetermdev/thenextwave/pkg/*"], "@/gopkg/*": ["frontend/bindings/github.com/wavetermdev/thenextwave/pkg/*"]
} }
} }
} }

View File

@ -1,5 +1,5 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react"; import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths"; import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({ export default defineConfig({