Skip to content

Commit 059d15d

Browse files
devmgnclaude
andcommitted
chore: reorganize npm scripts and rename lint workflow to check
- Flatten script naming: lint:oxlint → lint, lint:fmt → fmt, lint:knip → knip - Add unified commands: check (lint + fmt + knip), fix (lint:fix + fmt:fix) - Simplify knip from two-pass to single strict run - Rename lint.yml workflow to check.yml - Update CI rules, commands docs, and README Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent b20c253 commit 059d15d

6 files changed

Lines changed: 22 additions & 25 deletions

File tree

.claude/rules/ci.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ paths:
1212

1313
## Workflows
1414

15-
- **lint.yml**: `pnpm lint` (Oxlint + type check + Oxfmt) + `pnpm lint:knip` (dead code)
15+
- **check.yml**: `pnpm check` (Oxlint + Oxfmt + Knip)
1616
- **test.yml**: `pnpm test:unit` (Vitest)
1717
- **build.yml**: `pnpm build` + upload `.next/` artifact
1818
- **update-msw.yml**: Auto-update MSW worker (manual trigger + pnpm-lock.yaml changes, Renovate bot only)

.claude/rules/commands.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ pnpm start # Start production server
1414
## Linting & Formatting
1515

1616
```bash
17-
pnpm lint # Run all checks (Oxlint + type check + Oxfmt check)
18-
pnpm lint:oxlint # Oxlint check (type-aware + type-check)
19-
pnpm lint:oxlint:fix # Oxlint with auto-fix
20-
pnpm lint:fmt # Oxfmt formatting (check only)
21-
pnpm lint:fmt:fix # Oxfmt formatting (write)
22-
pnpm lint:knip # Dead code detection (strict mode)
17+
pnpm check # Run all checks (Oxlint + Oxfmt + Knip)
18+
pnpm fix # Auto-fix lint + format
19+
pnpm lint # Oxlint check (type-aware + type-check)
20+
pnpm lint:fix # Oxlint with auto-fix
21+
pnpm fmt # Oxfmt formatting (check only)
22+
pnpm fmt:fix # Oxfmt formatting (write)
23+
pnpm knip # Dead code detection (strict mode)
2324
```
2425

2526
## Testing
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: Check
22

33
on:
44
push:
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
Lint:
14+
Check:
1515
runs-on: ubuntu-24.04
1616
timeout-minutes: 10
1717
steps:
@@ -21,8 +21,5 @@ jobs:
2121
- name: Setup Project
2222
uses: ./.github/actions/setup
2323

24-
- name: Lint
25-
run: pnpm lint
26-
27-
- name: Check unused dependencies
28-
run: pnpm lint:knip
24+
- name: Check
25+
run: pnpm check

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ pnpm dev
2525
```bash
2626
pnpm dev # Development server
2727
pnpm build # Production build
28-
pnpm lint # Lint + type check (Oxlint + Oxfmt)
29-
pnpm lint:oxlint:fix # Oxlint with auto-fix
30-
pnpm lint:fmt:fix # Oxfmt formatting (write)
28+
pnpm check # All checks (Oxlint + Oxfmt + Knip)
29+
pnpm fix # Auto-fix lint + format
3130
pnpm test # Run tests
3231
pnpm test:coverage # Tests with coverage (80% threshold)
3332
pnpm storybook # Storybook dev server
34-
pnpm lint:knip # Dead code detection
3533
```

knip.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"postcss-load-config",
1414
],
1515
"oxlint": {
16-
"entry": ["oxlint.config.ts"],
16+
"config": ["oxlint.config.ts"],
1717
},
1818
"storybook": {
1919
"entry": [

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "pnpm lint:oxlint && pnpm lint:fmt",
10-
"lint:oxlint": "oxlint",
11-
"lint:oxlint:fix": "oxlint --fix",
12-
"lint:fmt": "oxfmt --check .",
13-
"lint:fmt:fix": "oxfmt --write .",
14-
"lint:knip": "knip --cache && knip --strict --cache",
9+
"check": "pnpm lint && pnpm fmt && pnpm knip",
10+
"fix": "pnpm lint:fix && pnpm fmt:fix",
11+
"lint": "oxlint",
12+
"lint:fix": "oxlint --fix",
13+
"fmt": "oxfmt --check .",
14+
"fmt:fix": "oxfmt --write .",
15+
"knip": "knip --strict --cache",
1516
"test": "vitest run",
1617
"test:unit": "vitest run --project=unit",
1718
"test:update": "vitest run --update",

0 commit comments

Comments
 (0)