Add Oxlint configuration and integrate linting commands

- Introduced a new `.oxlintrc.json` file to configure Oxlint for code quality checks.
- Updated `package.json` to include linting scripts (`lint` and `lint:fix`) for easier code maintenance.
- Enhanced documentation in `README` files to guide users on running Oxlint checks and applying fixes.
This commit is contained in:
discountry
2026-03-12 22:40:18 +08:00
parent 055bb445a9
commit eb70bab8c5
21 changed files with 95 additions and 46 deletions
+4
View File
@@ -226,6 +226,8 @@ EXCHANGE=binance BINANCE_MARKET_TYPE=spot BINANCE_SYMBOL=BTCUSDT bun run index.t
bun run index.ts # 启动 CLI(默认入口)
bun run start # 等价于运行 index.ts
bun run dev # 调试模式
bun run lint # 执行 Oxlint 检查
bun run lint:fix # 自动修复可安全修复的问题
bun x vitest run # 执行全部测试
```
@@ -292,6 +294,8 @@ bun run pm2:start:offset
## 测试
项目使用 Vitest
```bash
bun run lint
bun run lint:fix
bun run test
bun x vitest --watch
```