Skip to content

Commit 7d6b793

Browse files
committed
chore(projects): use oxlint and oxfmt replace eslint and prettier
1 parent 7755ed3 commit 7d6b793

8 files changed

Lines changed: 226 additions & 38 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
jobs:
99
release:
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version: lts/*
2626
cache: pnpm
27-
registry-url: "https://registry.npmjs.org"
27+
registry-url: 'https://registry.npmjs.org'
2828

2929
- run: npx githublogen
3030
env:

.oxfmtrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"arrowParens": "avoid"
6+
}

.oxlintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"categories": {
3+
"correctness": "error",
4+
"suspicious": "error"
5+
},
6+
"plugins": ["eslint", "typescript", "unicorn", "oxc", "import", "vue"],
7+
"rules": {
8+
"import/no-unassigned-import": "off",
9+
"unicorn/consistent-function-scoping": "off",
10+
"unicorn/no-array-sort": "off",
11+
"unicorn/no-array-reverse": "off",
12+
"unicorn/require-module-specifiers": "off"
13+
}
14+
}

.vscode/settings.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": "explicit",
4-
"source.organizeImports": "never"
3+
"source.fixAll.oxc": "explicit"
54
},
6-
"editor.formatOnSave": false,
7-
"eslint.validate": ["javascript", "typescript", "json", "jsonc"],
8-
"prettier.enable": false
5+
"editor.defaultFormatter": "oxc.oxc-vscode",
6+
"editor.formatOnSave": true
97
}

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Changelog
22

3-
43
## [v0.0.2](https://github.com/soybeanjs/utils/compare/v0.0.1...v0.0.2) (2026-02-03)
54

65
###    🚀 Features
@@ -32,4 +31,3 @@
3231
###    ❤️ Contributors
3332

3433
[![soybeanjs](https://github.com/soybeanjs.png?size=48)](https://github.com/soybeanjs)  
35-

eslint.config.js

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

package.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
{
22
"name": "@soybeanjs/utils",
3-
"type": "module",
43
"version": "0.0.2",
5-
"packageManager": "pnpm@10.28.1",
64
"description": "A collection of useful utility functions for JavaScript and TypeScript projects of SoybeanJS.",
5+
"homepage": "https://github.com/soybeanjs/utils",
6+
"bugs": {
7+
"url": "https://github.com/soybeanjs/utils/issues"
8+
},
9+
"license": "MIT",
710
"author": {
811
"name": "Soybean",
912
"email": "soybeanjs@outlook.com",
1013
"url": "https://github.com/soybeanjs"
1114
},
12-
"license": "MIT",
13-
"homepage": "https://github.com/soybeanjs/utils",
1415
"repository": {
1516
"url": "https://github.com/soybeanjs/utils.git"
1617
},
17-
"bugs": {
18-
"url": "https://github.com/soybeanjs/utils/issues"
19-
},
20-
"publishConfig": {
21-
"registry": "https://registry.npmjs.org/"
22-
},
18+
"files": [
19+
"dist"
20+
],
21+
"type": "module",
22+
"main": "./dist/index.js",
23+
"module": "./dist/index.js",
24+
"types": "./dist/index.d.ts",
2325
"exports": {
2426
".": {
2527
"types": "./dist/index.d.ts",
2628
"import": "./dist/index.js",
2729
"require": "./dist/index.js"
2830
}
2931
},
30-
"main": "./dist/index.js",
31-
"module": "./dist/index.js",
32-
"types": "./dist/index.d.ts",
33-
"files": ["dist"],
32+
"publishConfig": {
33+
"registry": "https://registry.npmjs.org/"
34+
},
3435
"scripts": {
3536
"build": "tsdown",
3637
"cleanup": "soy cleanup",
3738
"commit": "soy git-commit",
3839
"dev": "tsup --watch",
39-
"lint": "eslint . --fix",
40+
"lint": "oxlint --fix",
41+
"fmt": "oxfmt",
4042
"prepare": "simple-git-hooks",
4143
"publish-pkg": "pnpm publish --access public",
4244
"release": "soy release",
4345
"typecheck": "tsc --noEmit --skipLibCheck",
4446
"update-pkg": "soy ncu"
4547
},
46-
"dependencies": {},
4748
"devDependencies": {
4849
"@soybeanjs/cli": "1.4.4",
49-
"@soybeanjs/eslint-config": "1.7.5",
5050
"@types/node": "25.0.10",
51-
"eslint": "9.39.2",
5251
"lint-staged": "16.2.7",
52+
"oxfmt": "^0.28.0",
53+
"oxlint": "^1.43.0",
5354
"simple-git-hooks": "2.13.1",
5455
"tsdown": "0.20.0",
5556
"tsx": "4.21.0",
@@ -60,6 +61,7 @@
6061
"pre-commit": "pnpm typecheck && pnpm lint-staged"
6162
},
6263
"lint-staged": {
63-
"*": "eslint --fix"
64-
}
64+
"*": "oxlint --fix && oxfmt"
65+
},
66+
"packageManager": "pnpm@10.28.1"
6567
}

pnpm-lock.yaml

Lines changed: 179 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)