Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
run: pnpm run lint

- name: Check formatting
run: pnpm prettier --write --log-level=warn . && git diff --exit-code
run: pnpm oxfmt --check && git diff --exit-code

- name: Typecheck
run: pnpm run typecheck
Expand Down
39 changes: 39 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"semi": false,
"singleQuote": true,
"printWidth": 80,
"experimentalSortPackageJson": false,
"overrides": [
{
"files": ["*.json5"],
"options": {
"singleQuote": false,
"quoteProps": "preserve"
}
},
{
"files": ["*.yml"],
"options": {
"singleQuote": false
}
}
],
"ignorePatterns": [
"packages/*/CHANGELOG.md",
"packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error.*",
"playground-temp/",
"dist/",
"LICENSE.md",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"playground/tsconfig-json-load-error/has-error/tsconfig.json",
"playground/html/invalid.html",
"playground/html/invalidClick.html",
"playground/html/invalidEscape.html",
"playground/html/valid.html",
"playground/external/public/slash@3.0.0.js",
"playground/ssr-html/public/slash@3.0.0.js",
"playground/worker/classic-worker.js",
"playground/css/weapp.wxss"
]
}
16 changes: 0 additions & 16 deletions .prettierignore

This file was deleted.

19 changes: 0 additions & 19 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ For a mock dependency, make sure you add a `@vitejs/test-` prefix to the package

- Make sure tests pass!

- No need to worry about code style as long as you have installed the dev dependencies. Modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
- No need to worry about code style as long as you have installed the dev dependencies. Modified files are automatically formatted with Oxfmt on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).

- PR title must follow the [commit message convention](./.github/commit-convention.md) so that changelogs can be automatically generated.

Expand Down
12 changes: 6 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build.environment]
NODE_VERSION = "24"
# don't need playwright for docs build
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1"
NODE_VERSION = "24"
# don't need playwright for docs build
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1"
[build]
publish = "docs/.vitepress/dist"
command = "pnpm ci-docs"
ignore = "./scripts/docs-check.sh"
publish = "docs/.vitepress/dist"
command = "pnpm ci-docs"
ignore = "./scripts/docs-check.sh"
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "simple-git-hooks",
"format": "prettier --write --cache .",
"format": "oxfmt",
"lint": "eslint --cache .",
"typecheck": "tsc -p scripts && pnpm -r --parallel run typecheck",
"test": "pnpm test-unit && pnpm test-serve && pnpm test-build",
Expand Down Expand Up @@ -61,9 +61,9 @@
"execa": "^9.6.1",
"globals": "^17.3.0",
"lint-staged": "^16.2.7",
"oxfmt": "^0.28.0",
"picocolors": "^1.1.1",
"playwright-chromium": "^1.58.1",
"prettier": "3.8.1",
"rolldown": "1.0.0-rc.2",
"rollup": "^4.43.0",
"simple-git-hooks": "^2.13.1",
Expand All @@ -78,7 +78,7 @@
},
"lint-staged": {
"*": [
"prettier --write --cache --ignore-unknown"
"oxfmt --no-error-on-unmatched-pattern"
],
"packages/*/{src,types}/**/*.ts": [
"eslint --cache --fix"
Expand Down
11 changes: 5 additions & 6 deletions packages/create-vite/template-lit-ts/src/my-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ export class MyElement extends LitElement {
--accent-border: rgba(192, 132, 252, 0.5);
--social-bg: rgba(47, 48, 58, 0.5);
--shadow:
rgba(0, 0, 0, 0.4) 0 10px 15px -3px,
rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
}

#social .button-icon {
Expand Down Expand Up @@ -255,8 +254,8 @@ export class MyElement extends LitElement {
z-index: 1;
top: 34px;
height: 28px;
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg)
rotateY(39deg) scale(1.4);
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
scale(1.4);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New diff here, I think it is still related to oxc-project/oxc#15180, and probably the most complicated printWidth calculation problem. /cc @leaysgur

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, we need Doc -> FormatElement to align this w/ prettier.

}

.hero .vite {
Expand All @@ -265,8 +264,8 @@ export class MyElement extends LitElement {
height: 26px;
width: auto;
color: var(--vite-logo);
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg)
rotateY(39deg) scale(0.8);
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
scale(0.8);
}

#center {
Expand Down
14 changes: 6 additions & 8 deletions packages/create-vite/template-lit/src/my-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ export class MyElement extends LitElement {
--accent-border: rgba(170, 59, 255, 0.5);
--social-bg: rgba(244, 243, 236, 0.5);
--shadow:
rgba(0, 0, 0, 0.1) 0 10px 15px -3px,
rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
Expand Down Expand Up @@ -167,8 +166,7 @@ export class MyElement extends LitElement {
--accent-border: rgba(192, 132, 252, 0.5);
--social-bg: rgba(47, 48, 58, 0.5);
--shadow:
rgba(0, 0, 0, 0.4) 0 10px 15px -3px,
rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
}

#social .button-icon {
Expand Down Expand Up @@ -263,17 +261,17 @@ export class MyElement extends LitElement {
z-index: 1;
top: 34px;
height: 28px;
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg)
rotateY(39deg) scale(1.4);
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
scale(1.4);
}

.hero .vite {
z-index: 0;
top: 107px;
height: 26px;
width: auto;
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg)
rotateY(39deg) scale(0.8);
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
scale(0.8);
}

#center {
Expand Down
105 changes: 95 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.