Skip to content

Commit f1d05f4

Browse files
committed
chore: use oxlint and oxfmt
1 parent 8850eff commit f1d05f4

17 files changed

Lines changed: 1062 additions & 744 deletions

‎.oxfmtrc.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "https://unpkg.com/oxfmt/configuration_schema.json"
3+
}

‎.oxlintrc.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
3+
"plugins": ["unicorn", "typescript", "oxc"],
4+
"rules": {}
5+
}

‎.prettierrc‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎CHANGELOG.md‎

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

3-
43
## v0.2.0
54

65
[compare changes](https://github.com/unjs/citty/compare/v0.1.6...v0.2.0)
@@ -11,11 +10,11 @@
1110
- Support `enum` arg type ([#83](https://github.com/unjs/citty/pull/83))
1211
- Support `number` arg type ([#73](https://github.com/unjs/citty/pull/73))
1312
- Support `negativeDescription` for args ([#40](https://github.com/unjs/citty/pull/40))
14-
- ⚠️ Parsed optionals and enum type safety ([#174](https://github.com/unjs/citty/pull/174))
13+
- ⚠️ Parsed optionals and enum type safety ([#174](https://github.com/unjs/citty/pull/174))
1514

1615
### 🩹 Fixes
1716

18-
- ⚠️ Conditionally print negative boolean argument usage ([#177](https://github.com/unjs/citty/pull/177))
17+
- ⚠️ Conditionally print negative boolean argument usage ([#177](https://github.com/unjs/citty/pull/177))
1918
- **types:** Value type of NumberArgDef should be number ([#183](https://github.com/unjs/citty/pull/183))
2019
- Show cli error message ([#186](https://github.com/unjs/citty/pull/186))
2120
- Allow `number` arg to be optional ([#194](https://github.com/unjs/citty/pull/194))
@@ -24,12 +23,12 @@
2423

2524
- Show error once ([#167](https://github.com/unjs/citty/pull/167))
2625
- More strict types ([f597897](https://github.com/unjs/citty/commit/f597897))
27-
- ⚠️ Use `node:util.parseArgs` for arg parsing ([#218](https://github.com/unjs/citty/pull/218))
26+
- ⚠️ Use `node:util.parseArgs` for arg parsing ([#218](https://github.com/unjs/citty/pull/218))
2827
- Use simple console formatting ([#219](https://github.com/unjs/citty/pull/219))
2928

3029
### 📦 Build
3130

32-
- ⚠️ Esm-only dist ([42b57b0](https://github.com/unjs/citty/commit/42b57b0))
31+
- ⚠️ Esm-only dist ([42b57b0](https://github.com/unjs/citty/commit/42b57b0))
3332

3433
### 🏡 Chore
3534

@@ -54,10 +53,10 @@
5453

5554
#### ⚠️ Breaking Changes
5655

57-
- ⚠️ Parsed optionals and enum type safety ([#174](https://github.com/unjs/citty/pull/174))
58-
- ⚠️ Conditionally print negative boolean argument usage ([#177](https://github.com/unjs/citty/pull/177))
59-
- ⚠️ Use `node:util.parseArgs` for arg parsing ([#218](https://github.com/unjs/citty/pull/218))
60-
- ⚠️ Esm-only dist ([42b57b0](https://github.com/unjs/citty/commit/42b57b0))
56+
- ⚠️ Parsed optionals and enum type safety ([#174](https://github.com/unjs/citty/pull/174))
57+
- ⚠️ Conditionally print negative boolean argument usage ([#177](https://github.com/unjs/citty/pull/177))
58+
- ⚠️ Use `node:util.parseArgs` for arg parsing ([#218](https://github.com/unjs/citty/pull/218))
59+
- ⚠️ Esm-only dist ([42b57b0](https://github.com/unjs/citty/commit/42b57b0))
6160

6261
### ❤️ Contributors
6362

@@ -184,31 +183,30 @@
184183
- Add autofix ci ([2cfd134](https://github.com/unjs/citty/commit/2cfd134))
185184
- Fix typo in error code ([4f2c7ca](https://github.com/unjs/citty/commit/4f2c7ca))
186185

187-
### ❤️ Contributors
186+
### ❤️ Contributors
188187

189188
- Pooya Parsa ([@pi0](http://github.com/pi0))
190-
- Zuixinwang
189+
- Zuixinwang
191190
- Wang Yiding ([@yidingww](http://github.com/yidingww))
192191

193192
## v0.1.1
194193

195194
[compare changes](https://github.com/unjs/citty/compare/v0.1.0...v0.1.1)
196195

197-
198196
### 🩹 Fixes
199197

200-
- Remove sub-command name when resolving nested ([47398f1](https://github.com/unjs/citty/commit/47398f1))
201-
- Type untyped args as `string ([ boolean`](https://github.com/unjs/citty/commit/ boolean`))
202-
- Move deps to devDependencies ([#20](https://github.com/unjs/citty/pull/20))
203-
- Fix unspecified arg types ([d1d769b](https://github.com/unjs/citty/commit/d1d769b))
198+
- Remove sub-command name when resolving nested ([47398f1](https://github.com/unjs/citty/commit/47398f1))
199+
- Type untyped args as `string ([ boolean`](https://github.com/unjs/citty/commit/ boolean`))
200+
- Move deps to devDependencies ([#20](https://github.com/unjs/citty/pull/20))
201+
- Fix unspecified arg types ([d1d769b](https://github.com/unjs/citty/commit/d1d769b))
204202

205203
### 🏡 Chore
206204

207-
- Update lockfile ([fd037e4](https://github.com/unjs/citty/commit/fd037e4))
208-
- Update unbuild ([0810eaa](https://github.com/unjs/citty/commit/0810eaa))
209-
- Update lockfile ([69adc47](https://github.com/unjs/citty/commit/69adc47))
205+
- Update lockfile ([fd037e4](https://github.com/unjs/citty/commit/fd037e4))
206+
- Update unbuild ([0810eaa](https://github.com/unjs/citty/commit/0810eaa))
207+
- Update lockfile ([69adc47](https://github.com/unjs/citty/commit/69adc47))
210208

211-
### ❤️ Contributors
209+
### ❤️ Contributors
212210

213211
- Pooya Parsa ([@pi0](http://github.com/pi0))
214212
- Ʀᴀʏ ([@so1ve](http://github.com/so1ve))
@@ -218,38 +216,35 @@
218216

219217
[compare changes](https://github.com/unjs/citty/compare/v0.0.2...v0.1.0)
220218

221-
222219
### 🏡 Chore
223220

224-
- Inline deps ([ad8cec2](https://github.com/unjs/citty/commit/ad8cec2))
221+
- Inline deps ([ad8cec2](https://github.com/unjs/citty/commit/ad8cec2))
225222

226-
### ❤️ Contributors
223+
### ❤️ Contributors
227224

228225
- Pooya Parsa ([@pi0](http://github.com/pi0))
229226

230227
## v0.0.2
231228

232-
233229
### 🚀 Enhancements
234230

235-
- `setup` hook ([#9](https://github.com/unjs/citty/pull/9))
236-
- Allow accessing args with camelCase or kebabCase ([#17](https://github.com/unjs/citty/pull/17))
237-
- Basic type inference for args ([#1](https://github.com/unjs/citty/pull/1))
231+
- `setup` hook ([#9](https://github.com/unjs/citty/pull/9))
232+
- Allow accessing args with camelCase or kebabCase ([#17](https://github.com/unjs/citty/pull/17))
233+
- Basic type inference for args ([#1](https://github.com/unjs/citty/pull/1))
238234

239235
### 🩹 Fixes
240236

241-
- Correctly parse positional arguments ([#16](https://github.com/unjs/citty/pull/16))
242-
- Allow any args type for `SubCommandsDef` ([60d218d](https://github.com/unjs/citty/commit/60d218d))
237+
- Correctly parse positional arguments ([#16](https://github.com/unjs/citty/pull/16))
238+
- Allow any args type for `SubCommandsDef` ([60d218d](https://github.com/unjs/citty/commit/60d218d))
243239

244240
### 🏡 Chore
245241

246-
- Small fixes ([1f377a9](https://github.com/unjs/citty/commit/1f377a9))
247-
- Update pnpm ([ba75f83](https://github.com/unjs/citty/commit/ba75f83))
248-
- Fix build ([b7b42be](https://github.com/unjs/citty/commit/b7b42be))
249-
- Update deps ([b1a3f06](https://github.com/unjs/citty/commit/b1a3f06))
242+
- Small fixes ([1f377a9](https://github.com/unjs/citty/commit/1f377a9))
243+
- Update pnpm ([ba75f83](https://github.com/unjs/citty/commit/ba75f83))
244+
- Fix build ([b7b42be](https://github.com/unjs/citty/commit/b7b42be))
245+
- Update deps ([b1a3f06](https://github.com/unjs/citty/commit/b1a3f06))
250246

251-
### ❤️ Contributors
247+
### ❤️ Contributors
252248

253249
- Pooya Parsa ([@pi0](http://github.com/pi0))
254250
- Sebastiaan Van Arkens <[email protected]>
255-

‎eslint.config.mjs‎

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

‎package.json‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,38 @@
22
"name": "citty",
33
"version": "0.2.0",
44
"description": "Elegant CLI Builder",
5-
"repository": "unjs/citty",
65
"license": "MIT",
7-
"sideEffects": false,
6+
"repository": "unjs/citty",
7+
"files": [
8+
"dist"
9+
],
810
"type": "module",
11+
"sideEffects": false,
12+
"types": "./dist/index.d.mts",
913
"exports": {
1014
".": "./dist/index.mjs"
1115
},
12-
"types": "./dist/index.d.mts",
13-
"files": [
14-
"dist"
15-
],
1616
"scripts": {
1717
"build": "obuild",
1818
"dev": "vitest dev",
19-
"lint": "eslint --cache . && prettier -c src test",
20-
"lint:fix": "eslint --cache . --fix && prettier -c src test -w",
19+
"lint": "oxlint . && oxfmt --check",
20+
"lint:fix": "oxlint . --fix && oxfmt",
2121
"prepack": "pnpm run build",
2222
"play": "node ./playground/cli.ts",
2323
"release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
2424
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
25-
"test:types": "tsc --noEmit"
25+
"test:types": "tsgo --noEmit"
2626
},
2727
"devDependencies": {
2828
"@types/node": "^25.2.3",
29+
"@typescript/native-preview": "7.0.0-dev.20260212.1",
2930
"@vitest/coverage-v8": "^4.0.18",
3031
"automd": "^0.4.3",
3132
"changelogen": "^0.6.2",
32-
"eslint": "^9.39.2",
3333
"eslint-config-unjs": "^0.6.2",
3434
"obuild": "^0.4.27",
35-
"prettier": "^3.8.1",
35+
"oxfmt": "^0.32.0",
36+
"oxlint": "^1.47.0",
3637
"scule": "^1.3.0",
3738
"typescript": "^5.9.3",
3839
"vitest": "^4.0.18"

‎playground/commands/deploy.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export default defineCommand({
2828
},
2929
prod: {
3030
type: "boolean",
31-
description:
32-
"Create a production deployment (default is preview deployment)",
31+
description: "Create a production deployment (default is preview deployment)",
3332
},
3433
project: {
3534
type: "string",

0 commit comments

Comments
 (0)