diff --git a/.vitepress/config.mts b/.vitepress/config.mts index f8c74aa1cd..6568a4d47f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,4 +1,4 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from 'vitepress'; export default defineConfig({ srcDir: 'docs', @@ -7,9 +7,16 @@ export default defineConfig({ base: '/', title: 'The JavaScript Oxidation Compiler', titleTemplate: ':title | The JavaScript Oxidation Compiler', - description: 'A collection of high-performance JavaScript tools written in Rust', + description: + 'A collection of high-performance JavaScript tools written in Rust', head: [ - ['link', { rel: 'icon', href: 'https://raw.githubusercontent.com/oxc-project/oxc-assets/main/logo-round.png' }], + [ + 'link', + { + rel: 'icon', + href: 'https://raw.githubusercontent.com/oxc-project/oxc-assets/main/logo-round.png', + }, + ], ], lastUpdated: true, themeConfig: { @@ -25,7 +32,11 @@ export default defineConfig({ { text: 'Contribute', link: '/docs/contribute/intro' }, { text: 'Learn', link: '/docs/learn/ecosystem' }, { text: 'Blog', link: '/blog/2022-02-10-js-tooling-research' }, - { text: 'Playground', target: '_blank', link: 'https://oxc-project.github.io/oxc/playground/' }, + { + text: 'Playground', + target: '_blank', + link: 'https://oxc-project.github.io/oxc/playground/', + }, ], socialLinks: [ { icon: 'twitter', link: 'https://x.com/boshen_c' }, @@ -54,20 +65,25 @@ export default defineConfig({ items: [ { text: 'Philosophy', link: '/docs/usage/philosophy' }, { text: 'Benchmarks', link: '/docs/usage/benchmarks' }, - ] - } + ], + }, ], '/docs/contribute/': [ { text: 'Intro', link: '/docs/contribute/intro' }, { text: 'Rules', link: '/docs/contribute/rules' }, - { text: 'Parser', link: '/docs/contribute/parser' }, - { text: 'Linter', link: '/docs/contribute/linter' }, - { text: 'Resolver', link: '/docs/contribute/resolver' }, - { text: 'Transformer', link: '/docs/contribute/transformer' }, - { text: 'Formatter', link: '/docs/contribute/formatter' }, - { text: 'Codegen', link: '/docs/contribute/codegen' }, - { text: 'Minifier', link: '/docs/contribute/minifier' }, - { text: 'Vscode', link: '/docs/contribute/vscode' }, + { + items: [ + { text: 'Parser', link: '/docs/contribute/parser' }, + { text: 'Linter', link: '/docs/contribute/linter' }, + { text: 'Prettier', link: '/docs/contribute/prettier' }, + { text: 'Resolver', link: '/docs/contribute/resolver' }, + { text: 'Transformer', link: '/docs/contribute/transformer' }, + { text: 'Formatter', link: '/docs/contribute/formatter' }, + { text: 'Codegen', link: '/docs/contribute/codegen' }, + { text: 'Minifier', link: '/docs/contribute/minifier' }, + { text: 'VSCode', link: '/docs/contribute/vscode' }, + ], + }, { text: 'Performance', link: '/docs/contribute/performance' }, { text: 'Showcase', link: '/docs/contribute/showcase' }, ], @@ -81,7 +97,10 @@ export default defineConfig({ { text: 'Parser', link: '/docs/learn/architecture/parser' }, { text: 'Linter', link: '/docs/learn/architecture/linter' }, { text: 'Resolver', link: '/docs/learn/architecture/resolver' }, - { text: 'Transformer', link: '/docs/learn/architecture/transformer' }, + { + text: 'Transformer', + link: '/docs/learn/architecture/transformer', + }, { text: 'Formatter', link: '/docs/learn/architecture/formatter' }, { text: 'Minifier', link: '/docs/learn/architecture/minifier' }, ], @@ -97,11 +116,20 @@ export default defineConfig({ { text: 'References', link: '/docs/learn/references' }, ], '/blog/': [ - { text: 'Oxlint General Availability', link: '/blog/2023-11-08-announcing-oxlint' }, + { + text: 'Oxlint General Availability', + link: '/blog/2023-11-08-announcing-oxlint', + }, { text: 'Announcing Oxc', link: '/blog/2023-11-07-announcing-oxc' }, - { text: 'A research on JavaScript linters', link: '/blog/2022-08-08-linter-research' }, - { text: 'High Performance JavaScript Toolchain', link: '/blog/2022-02-10-js-tooling-research' }, - ] + { + text: 'A research on JavaScript linters', + link: '/blog/2022-08-08-linter-research', + }, + { + text: 'High Performance JavaScript Toolchain', + link: '/blog/2022-02-10-js-tooling-research', + }, + ], }, }, -}) +}); diff --git a/docs/docs/contribute/prettier.md b/docs/docs/contribute/prettier.md new file mode 100644 index 0000000000..14a62b7548 --- /dev/null +++ b/docs/docs/contribute/prettier.md @@ -0,0 +1,6 @@ +--- +title: Prettier +outline: deep +--- + +# Prettier diff --git a/docs/docs/contribute/rules.md b/docs/docs/contribute/rules.md index 170a27220e..7c0db99a1f 100644 --- a/docs/docs/contribute/rules.md +++ b/docs/docs/contribute/rules.md @@ -3,13 +3,15 @@ title: Rules outline: deep --- -- We welcome any form of contributions +# Rules + +- We welcome any form of contributions. - APIs should be simple and well-documented. - All performance issues (runtime and compilation speed) are considered as bugs in this project. - Third-party dependencies should be minimal. - Monitor code coverage for unused code. Aim for 99% code coverage. - Embrace data-oriented design. -- We prefer smaller PRs to get things merged quickly. Try stacked PRs with https://graphite.dev if repo write permission is given to you. +- We prefer smaller PRs to get things merged quickly. Try stacked PRs with [graphite](https://graphite.dev) if repo write permission is given to you. --- diff --git a/package.json b/package.json index 7a2dc55b98..fc94ad6f2b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "typescript": "~5.2.2" }, "lint-staged": { - "*.{js,jsx,tsx,ts,css,md,json}": "prettier --write" + "*.{js,jsx,tsx,ts,css,md,json,mts}": "prettier --write" }, "engines": { "node": ">=18.0"