Skip to content

Commit 0745a95

Browse files
committed
chore: add syntax check and reorder CI pipeline
Add 'syntax' step using node --check for each source file. Reorder CI: syntax → lint → format:check → test (fast checks first). Fix: use format:check instead of format in CI (don't modify files).
1 parent 48a9d91 commit 0745a95

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

DEVELOPMENT.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
1919

2020
## Scripts
2121

22-
| Command | Description |
23-
| ---------------------- | ------------------------------------------- |
24-
| `npm run ci` | Run all checks (test + lint + format) |
25-
| `npm run dev` | Run CI then prepare Firefox dev environment |
26-
| `npm run all` | Run CI then build Chrome & Firefox packages |
27-
| `npm test` | Run tests (Vitest) |
28-
| `npm run prepare` | Setup Husky git hooks |
29-
| `npm run lint` | Lint code (oxlint) |
30-
| `npm run format` | Format code (oxfmt) |
31-
| `npm run format:check` | Check code formatting |
32-
| `npm run build` | Build Chrome and Firefox packages |
33-
| `npm run dev:firefox` | Create Firefox dev environment |
22+
| Command | Description |
23+
| ---------------------- | ---------------------------------------------------- |
24+
| `npm run ci` | Run all checks (syntax + lint + format:check + test) |
25+
| `npm run dev` | Run CI then prepare Firefox dev environment |
26+
| `npm run all` | Run CI then build Chrome & Firefox packages |
27+
| `npm test` | Run tests (Vitest) |
28+
| `npm run prepare` | Setup Husky git hooks |
29+
| `npm run syntax` | Check source files for syntax errors |
30+
| `npm run lint` | Lint code (oxlint) |
31+
| `npm run format` | Format code (oxfmt) |
32+
| `npm run format:check` | Check code formatting |
33+
| `npm run build` | Build Chrome and Firefox packages |
34+
| `npm run dev:firefox` | Create Firefox dev environment |
3435

3536
## Project Structure
3637

@@ -65,5 +66,5 @@ npm run dev:firefox
6566

6667
```bash
6768
npm test # Run all tests
68-
npm run ci # Run tests + lint + format in one step
69+
npm run ci # Run syntax + lint + format:check + test in one step
6970
```

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
},
1717
"type": "module",
1818
"scripts": {
19-
"ci": "npm run test && npm run lint && npm run format",
19+
"ci": "npm run syntax && npm run lint && npm run format:check && npm run test",
2020
"dev": "npm run ci && npm run dev:firefox",
2121
"all": "npm run ci && npm run build",
2222
"build": "rm -rf dist/tmp-firefox dist/*.zip && mkdir -p dist && V=$npm_package_version && zip -r \"dist/github-notifier-pro-chrome-$V.zip\" manifest.json src/ images/ -x '*.DS_Store' '*.git*' '*node_modules*' '*.md' && mkdir -p dist/tmp-firefox && cp manifest-firefox.json dist/tmp-firefox/manifest.json && cp -r src images dist/tmp-firefox/ && (cd dist/tmp-firefox && zip -r \"../github-notifier-pro-firefox-$V.zip\" manifest.json src/ images/ -x '*.DS_Store' '*.git*' '*node_modules*' '*.md') && rm -rf dist/tmp-firefox && echo '✨ Build complete! Chrome & Firefox packages in dist/'",
2323
"dev:firefox": "rm -rf dist/firefox-dev && mkdir -p dist/firefox-dev && cp manifest-firefox.json dist/firefox-dev/manifest.json && cp -r src dist/firefox-dev/ && cp -r images dist/firefox-dev/ && echo '🦊 Firefox dev environment ready at dist/firefox-dev/'",
2424
"test": "vitest run",
25+
"syntax": "find src -name '*.js' -exec node --check {} +",
2526
"lint": "oxlint --deny-warnings src/ tests/",
2627
"format": "oxfmt --write .",
2728
"format:check": "oxfmt --check .",

0 commit comments

Comments
 (0)