Skip to content

Commit 4fbf4eb

Browse files
committed
Migrate to oxfmt
1 parent 853d3dd commit 4fbf4eb

File tree

6 files changed

+239
-154
lines changed

6 files changed

+239
-154
lines changed

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ src
88
eslint.config.js
99
.gitignore
1010
.gitattributes
11-
.prettierrc.js
11+
.oxfmtrc.json
12+
.vscode
1213
.yarnrc.yml
1314
rolldown.config.js
1415
tsconfig.eslint.json

.oxfmtrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"importOrder": [
6+
"<BUILTIN_MODULES>",
7+
"<THIRD_PARTY_MODULES>"
8+
],
9+
"sortPackageJson": false,
10+
"ignorePatterns": [
11+
"*.d.ts"
12+
]
13+
}

.prettierrc.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"[typescript]": {
5+
"editor.defaultFormatter": "oxc.oxc-vscode"
6+
},
7+
"[typescriptreact]": {
8+
"editor.defaultFormatter": "oxc.oxc-vscode"
9+
}
10+
}

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"generate-dts": "tsc --project tsconfig.build.json",
2929
"build": "rolldown -c rolldown.config.js && npm run generate-dts",
3030
"pack:test": "tsx scripts/pack-test",
31-
"prettier:check": "prettier --check \"**/*.{ts,tsx}\"",
32-
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
31+
"format:check": "oxfmt --check \"**/*.{ts,tsx}\"",
32+
"format:write": "oxfmt --write \"**/*.{ts,tsx}\"",
3333
"typecheck": "tsc --noEmit",
3434
"lint": "eslint --cache .",
3535
"jest": "jest",
36-
"test": "npm run prettier:check && npm run typecheck && npm run lint && npm run jest && npm run build && npm run pack:test && npm run knip",
36+
"test": "npm run format:check && npm run typecheck && npm run lint && npm run jest && npm run build && npm run pack:test && npm run knip",
3737
"jest:coverage": "jest --coverage",
3838
"jest:watch": "jest --watch",
3939
"release": "npm test && tsx scripts/release",
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@eslint/js": "^10.0.0",
46-
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
4746
"@size-limit/esbuild-why": "^12.0.0",
4847
"@size-limit/preset-small-lib": "^12.0.0",
4948
"@types/fs-extra": "^11",
@@ -58,7 +57,7 @@
5857
"knip": "^6.0.0",
5958
"new-github-release-url": "^2.0.0",
6059
"open": "^11.0.0",
61-
"prettier": "^3.6.2",
60+
"oxfmt": "^0.42.0",
6261
"rimraf": "^6.0.1",
6362
"rolldown": "^1.0.0-rc.9",
6463
"rollup-plugin-visualizer": "^7.0.0",

0 commit comments

Comments
 (0)