Skip to content

Commit 095568d

Browse files
committed
chore: add syntax check and reorder CI pipeline
Add cross-platform 'syntax' step using node --check for each source file. Reorder CI: syntax → lint → format:check → test (fast checks first).
1 parent 38a2d5b commit 095568d

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

DEVELOPMENT.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,21 @@ Open the project in VS Code and press **F5** to launch the Extension Development
1919

2020
## Scripts
2121

22-
| Command | Description |
23-
| ---------------------- | ------------------------------------- |
24-
| `npm test` | Run tests (Vitest) |
25-
| `npm run ci` | Run all checks (test + lint + format) |
26-
| `npm run lint` | Lint code (oxlint) |
27-
| `npm run format` | Format code (oxfmt) |
28-
| `npm run format:check` | Check code formatting |
29-
| `npm run package` | Package extension as `.vsix` |
22+
| Command | Description |
23+
| ---------------------- | ---------------------------------------------- |
24+
| `npm test` | Run tests (Vitest) |
25+
| `npm run ci` | Run all checks (syntax + lint + format + test) |
26+
| `npm run syntax` | Check source files for syntax errors |
27+
| `npm run lint` | Lint code (oxlint) |
28+
| `npm run format` | Format code (oxfmt) |
29+
| `npm run format:check` | Check code formatting |
30+
| `npm run package` | Package extension as `.vsix` |
3031

3132
## Testing
3233

3334
```bash
3435
npm test # Run all tests
35-
npm run ci # Run tests + lint + format check in one step
36+
npm run ci # Run syntax + lint + format + test in one step
3637
```
3738

3839
Tests use [Vitest](https://vitest.dev/).

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"main": "./src/extension.js",
2626
"scripts": {
2727
"vscode:prepublish": "npm run ci",
28-
"ci": "npm run test && npm run lint && npm run format:check",
28+
"ci": "npm run syntax && npm run lint && npm run format:check && npm run test",
2929
"test": "vitest run",
30+
"syntax": "node -e \"for(const f of require('fs').readdirSync('src').filter(n=>n.endsWith('.js')))require('child_process').execSync('node --check src/'+f,{stdio:'inherit'})\"",
3031
"lint": "oxlint --deny-warnings src/ tests/",
3132
"lint:fix": "oxlint --deny-warnings src/ tests/ --fix",
3233
"format": "oxfmt --write .",

0 commit comments

Comments
 (0)