Skip to content

Commit 69a8420

Browse files
committed
refactor(projects): migrate to oxlint & oxfmt
1 parent a6e9224 commit 69a8420

File tree

14 files changed

+523
-341
lines changed

14 files changed

+523
-341
lines changed

.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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": ["dist", "node_modules", "CHANGELOG.md"],
4+
"printWidth": 120,
5+
"singleQuote": true,
6+
"trailingComma": "none",
7+
"arrowParens": "avoid"
8+
}

.oxlintrc.json

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

.prettierrc

Whitespace-only changes.

.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
"afzalsayed96.icones",
44
"antfu.iconify",
55
"antfu.unocss",
6-
"dbaeumer.vscode-eslint",
76
"editorconfig.editorconfig",
8-
"esbenp.prettier-vscode",
9-
"lokalise.i18n-ally",
107
"mhutchie.git-graph",
118
"mikestead.dotenv",
129
"naumovs.color-highlight",

.vscode/settings.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +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": [
8-
"html",
9-
"css",
10-
"scss",
11-
"json",
12-
"jsonc",
13-
"javascript",
14-
"javascriptreact",
15-
"typescript",
16-
"typescriptreact"
17-
],
18-
"prettier.enable": false
5+
"editor.defaultFormatter": "oxc.oxc-vscode",
6+
"editor.formatOnSave": true
197
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import {
1515
getChangelogMarkdown,
1616
getTotalChangelogMarkdown,
1717
generateChangelog,
18-
generateTotalChangelog,
19-
} from "@soybeanjs/changelog";
18+
generateTotalChangelog
19+
} from '@soybeanjs/changelog';
2020

2121
// get the changelog markdown by two git tags
2222
getChangelogMarkdown();

eslint.config.js

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

package.json

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,52 @@
11
{
22
"name": "@soybeanjs/changelog",
3-
"type": "module",
43
"version": "0.4.3",
5-
"packageManager": "pnpm@10.26.2",
64
"description": "generate changelog form git tags and commits for github",
5+
"homepage": "https://github.com/soybeanjs/changelog",
6+
"bugs": {
7+
"url": "https://github.com/soybeanjs/changelog/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/changelog",
1415
"repository": {
1516
"url": "https://github.com/soybeanjs/changelog.git"
1617
},
17-
"bugs": {
18-
"url": "https://github.com/soybeanjs/changelog/issues"
19-
},
20-
"publishConfig": {
21-
"registry": "https://registry.npmjs.org/"
22-
},
18+
"files": [
19+
"dist"
20+
],
21+
"type": "module",
2322
"sideEffects": false,
23+
"main": "./dist/index.js",
24+
"module": "./dist/index.js",
25+
"types": "./dist/index.d.ts",
2426
"exports": {
2527
".": {
2628
"types": "./dist/index.d.ts",
2729
"import": "./dist/index.js",
2830
"require": "./dist/index.js"
2931
}
3032
},
31-
"main": "./dist/index.js",
32-
"module": "./dist/index.js",
33-
"types": "./dist/index.d.ts",
34-
"files": ["dist"],
35-
"engines": {
36-
"node": ">=18",
37-
"pnpm": ">=9"
33+
"publishConfig": {
34+
"registry": "https://registry.npmjs.org/"
3835
},
3936
"scripts": {
4037
"build": "tsdown && pnpm build-pkg",
4138
"build-pkg": "pnpm -r --filter='./packages/*' run build",
4239
"cleanup": "soy cleanup",
4340
"commit": "soy git-commit",
44-
"lint": "eslint . --fix",
41+
"fmt": "oxfmt",
42+
"lint": "oxlint --fix",
4543
"prepare": "simple-git-hooks",
4644
"publish-pkg": "pnpm -r publish --access public",
4745
"release": "soy release",
4846
"typecheck": "tsc --noEmit --skipLibCheck",
4947
"update-pkg": "soy ncu"
5048
},
5149
"dependencies": {
52-
"@soybeanjs/eslint-config": "1.7.5",
5350
"cli-progress": "3.12.0",
5451
"convert-gitmoji": "0.1.5",
5552
"dayjs": "1.11.19",
@@ -62,8 +59,9 @@
6259
"@types/cli-progress": "3.11.6",
6360
"@types/node": "25.0.3",
6461
"@types/semver": "7.7.1",
65-
"eslint": "9.39.2",
6662
"lint-staged": "16.2.7",
63+
"oxfmt": "^0.36.0",
64+
"oxlint": "^1.51.0",
6765
"simple-git-hooks": "2.13.1",
6866
"tsdown": "0.18.2",
6967
"tsx": "4.21.0",
@@ -74,6 +72,11 @@
7472
"pre-commit": "pnpm typecheck && pnpm lint-staged"
7573
},
7674
"lint-staged": {
77-
"*": "eslint --fix"
78-
}
75+
"*": "oxlint --fix && oxfmt"
76+
},
77+
"engines": {
78+
"node": ">=18",
79+
"pnpm": ">=9"
80+
},
81+
"packageManager": "pnpm@10.26.2"
7982
}

packages/githublogen/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919
on:
2020
push:
2121
tags:
22-
- "v*"
22+
- 'v*'
2323

2424
jobs:
2525
release:

0 commit comments

Comments
 (0)