Skip to content

Commit

Permalink
Fix prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz committed May 28, 2024
1 parent cdaa85f commit c49050f
Show file tree
Hide file tree
Showing 35 changed files with 13,224 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ insert_final_newline = true

[*.{js,jsx,ts,tsx,json,yml,css,less}]
charset = utf-8
indent_style = tab
indent_style = space
indent_size = 4
16 changes: 8 additions & 8 deletions .storybook/global.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
body {
height: 100vh;
padding: 0;
height: 100vh;
padding: 0;
}

#storybook-root {
height: 100%;
height: 100%;
}

.grid-item {
background-color: aquamarine;
border: 1px black solid;
background-color: aquamarine;
border: 1px black solid;

&.react-grid-placeholder {
background-color: orange;
}
&.react-grid-placeholder {
background-color: orange;
}
}
30 changes: 15 additions & 15 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../lib/**/*.mdx", "../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
managerHead: (head) => `
stories: ["../lib/**/*.mdx", "../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
managerHead: (head) => `
${head}
<meta name="robots" content="noindex" />
`,
Expand Down
30 changes: 15 additions & 15 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import { HTML5Backend } from "react-dnd-html5-backend";
import "./global.css";

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(Story) => (
<DndProvider backend={HTML5Backend}>
<Story />
</DndProvider>
),
],
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(Story) => (
<DndProvider backend={HTML5Backend}>
<Story />
</DndProvider>
),
],
};

export default preview;
14 changes: 7 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"golang.go",
"dbaeumer.vscode-eslint",
"vitest.explorer",
"task.vscode-task"
]
"recommendations": [
"esbenp.prettier-vscode",
"golang.go",
"dbaeumer.vscode-eslint",
"vitest.explorer",
"task.vscode-task"
]
}
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.useEditorConfig": true,
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.useEditorConfig": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodeLinker: node-modules
nodeLinker: node-modules
13 changes: 4 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";

export default
tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier
);
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, eslintConfigPrettier);
6 changes: 2 additions & 4 deletions frontend/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Copyright 2024, Command Line Inc.
// 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 { Provider } from "jotai";
import { clsx } from "clsx";
import { Workspace } from "@/app/workspace/workspace";
import { globalStore, atoms } from "@/store/global";

import "../../public/style.less";
import { CenteredDiv } from "./element/quickelems";
Expand Down
9 changes: 4 additions & 5 deletions frontend/app/block/block.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Copyright 2024, Command Line Inc.
// 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 { PreviewView } from "@/app/view/preview";
import { TerminalView } from "@/app/view/term";
import { CenteredDiv } from "@/element/quickelems";
import * as WOS from "@/store/wos";
import * as React from "react";

import "./block.less";

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/element/button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import * as React from "react";
import { clsx } from "clsx";
import * as React from "react";

import "./button.less";

Expand Down
4 changes: 2 additions & 2 deletions frontend/app/element/directorytable.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2024, Command Line Inc.
// 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 { Table, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
import React from "react";

import "./directorytable.less";

Expand Down
3 changes: 1 addition & 2 deletions frontend/app/element/markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import * as React from "react";
import { clsx } from "clsx";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import { clsx } from "clsx";

import "./markdown.less";

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/element/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import React from "react";
import { Button } from "@/element/button";
import React from "react";

import "./modal.less";

Expand Down
4 changes: 2 additions & 2 deletions frontend/app/store/global.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import { Events } from "@wailsio/runtime";
import * as jotai from "jotai";
import * as rxjs from "rxjs";
import { Events } from "@wailsio/runtime";
import * as WOS from "./wos";

const globalStore = jotai.createStore();
Expand Down Expand Up @@ -107,4 +107,4 @@ function useBlockAtom<T>(blockId: string, name: string, makeFn: () => jotai.Atom
return atom as jotai.Atom<T>;
}

export { globalStore, atoms, getBlockSubject, useBlockAtom, WOS };
export { WOS, atoms, getBlockSubject, globalStore, useBlockAtom };
19 changes: 9 additions & 10 deletions frontend/app/store/wos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@

// WaveObjectStore

import * as React from "react";
import { Call as $Call, Events } from "@wailsio/runtime";
import * as jotai from "jotai";
import { Events } from "@wailsio/runtime";
import { Call as $Call } from "@wailsio/runtime";
import { globalStore, atoms } from "./global";
import * as React from "react";
import { atoms, globalStore } from "./global";

type WaveObjectDataItemType<T extends WaveObj> = {
value: T;
Expand Down Expand Up @@ -274,14 +273,14 @@ export function CloseTab(tabId: string): Promise<void> {
}

export {
cleanWaveObjectCache,
clearWaveObjectCache,
getStaticObjectValue,
loadAndPinWaveObject,
makeORef,
updateWaveObject,
updateWaveObjects,
useWaveObject,
useWaveObjectValue,
useWaveObjectValueWithSuspense,
loadAndPinWaveObject,
clearWaveObjectCache,
updateWaveObject,
updateWaveObjects,
cleanWaveObjectCache,
getStaticObjectValue,
};
5 changes: 1 addition & 4 deletions frontend/app/tab/tab.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright 2023, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import * as React from "react";
import * as jotai from "jotai";
import { Block } from "@/app/block/block";
import { atoms } from "@/store/global";
import * as WOS from "@/store/wos";

import "./tab.less";
import { CenteredDiv, CenteredLoadingDiv } from "../element/quickelems";
import "./tab.less";

const TabContent = ({ tabId }: { tabId: string }) => {
const [tabData, tabLoading] = WOS.useWaveObjectValue<Tab>(WOS.makeORef("tab", tabId));
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/view/plotview.tsx
Original file line number Diff line number Diff line change
@@ -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 { WaveModal } from "@/element/modal";
import * as Plot from "@observablehq/plot";
import * as d3 from "d3";
import * as React from "react";

import "./plotview.less";

Expand Down
12 changes: 5 additions & 7 deletions frontend/app/view/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import * as React from "react";
import * as jotai from "jotai";
import { atoms, useBlockAtom } from "@/store/global";
import { FileInfo, FileService, FullFile } from "@/bindings/fileservice";
import { DirectoryTable } from "@/element/directorytable";
import { Markdown } from "@/element/markdown";
import { FileService, FileInfo, FullFile } from "@/bindings/fileservice";
import { useBlockAtom } from "@/store/global";
import * as WOS from "@/store/wos";
import * as util from "@/util/util";
import * as jotai from "jotai";
import { CenteredDiv } from "../element/quickelems";
import { DirectoryTable } from "@/element/directorytable";
import * as WOS from "@/store/wos";

import "./view.less";
import { first } from "rxjs";

const MaxFileSize = 1024 * 1024 * 10; // 10MB

Expand Down
10 changes: 4 additions & 6 deletions frontend/app/view/term.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright 2024, Command Line Inc.
// 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 { getBlockSubject } from "@/store/global";
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 "/public/xterm.css";
Expand Down
7 changes: 3 additions & 4 deletions frontend/app/workspace/workspace.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0

import * as React from "react";
import * as jotai from "jotai";
import { TabContent } from "@/app/tab/tab";
import { clsx } from "clsx";
import { atoms } from "@/store/global";
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";

Expand Down
2 changes: 1 addition & 1 deletion frontend/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ function base64ToArray(b64: string): Uint8Array {
return rtnArr;
}

export { base64ToString, stringToBase64, base64ToArray };
export { base64ToArray, base64ToString, stringToBase64 };
Loading

0 comments on commit c49050f

Please sign in to comment.