add formatter config

This commit is contained in:
Evan Simkowitz
2024-09-12 15:55:36 -07:00
parent 9e851397e2
commit 0bc1e3498b
9 changed files with 95 additions and 69 deletions
+1 -5
View File
@@ -1,9 +1,5 @@
build
bin
.git
frontend/dist
frontend/node_modules
node_modules
*.min.*
frontend/app/store/services.ts
frontend/types/gotypes.d.ts
*.mdx
+6 -1
View File
@@ -1,3 +1,8 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "unifiedjs.vscode-mdx"]
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"unifiedjs.vscode-remark"
]
}
+40
View File
@@ -0,0 +1,40 @@
{
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.useEditorConfig": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.autoIndent": "keep"
},
"[markdown]": {
"editor.defaultFormatter": "unifiedjs.vscode-remark"
}
}
-18
View File
@@ -1,18 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Storybook",
"type": "shell",
"command": "yarn storybook",
"presentation": {
"reveal": "silent",
"panel": "shared"
},
"runOptions": {
"instanceLimit": 1,
"runOn": "folderOpen"
}
}
]
}
+1 -1
View File
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
+35 -33
View File
@@ -1,41 +1,43 @@
import type {Config} from '@docusaurus/types';
import type { Config } from "@docusaurus/types";
const config: Config = {
title: 'Wave Terminal Documentation',
tagline: 'Wavy Wavy Wavy',
favicon: 'img/wave-logo_appicon.svg',
title: "Wave Terminal Documentation",
tagline: "Wavy Wavy Wavy",
favicon: "img/wave-logo_appicon.svg",
// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
url: "https://your-docusaurus-site.example.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: "/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'wavetermdev', // Usually your GitHub org/user name.
projectName: 'waveterm-docs', // Usually your repo name.
organizationName: "wavetermdev", // Usually your GitHub org/user name.
projectName: "waveterm-docs-new", // Usually your repo name.
deploymentBranch: "main",
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
defaultLocale: "en",
locales: ["en"],
},
plugins: [
['content-docs', {
path: 'docs',
routeBasePath: '/'
} as import('@docusaurus/plugin-content-docs').Options],
],
themes: [
'classic',
[
"content-docs",
{
path: "docs",
routeBasePath: "/",
} as import("@docusaurus/plugin-content-docs").Options,
],
],
themes: ["classic"],
themeConfig: {
docs: {
sidebar: {
@@ -44,37 +46,37 @@ const config: Config = {
},
},
colorMode: {
defaultMode: 'light',
defaultMode: "light",
disableSwitch: true,
respectPrefersColorScheme: true
respectPrefersColorScheme: true,
},
navbar: {
logo: {
src: "img/wave-light.png",
srcDark: "img/wave-dark.png",
href: "https://waveterm.dev/",
height: "32px"
height: "32px",
},
hideOnScroll: true,
items: [
{
type: 'docsVersionDropdown',
position: 'right',
type: "docsVersionDropdown",
position: "right",
},
{
type: 'localeDropdown',
position: 'right',
type: "localeDropdown",
position: "right",
},
{
label: "Github",
href: 'https://github.com/wavetermdev/waveterm',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
href: "https://github.com/wavetermdev/waveterm",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
]
}
}
],
},
},
};
export default config;
+9 -8
View File
@@ -1,11 +1,12 @@
/** @type {import("prettier").Config} */
module.exports = {
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120,
trailingComma: "es5",
useTabs: false,
jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true,
jsdocSeparateTagGroups: true,
jsdocPreferCodeFences: true,
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120,
trailingComma: "es5",
useTabs: false,
singleQuote: false,
jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true,
jsdocSeparateTagGroups: true,
jsdocPreferCodeFences: true,
};
+2 -2
View File
@@ -1,4 +1,4 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
/**
* Creating a sidebar enables you to:
@@ -12,7 +12,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
// But you can create a sidebar manually
/*
+1 -1
View File
@@ -18,7 +18,7 @@
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
[data-theme="dark"] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;