Skip to content

Commit 1c3c30e

Browse files
committed
chore: enhance project configuration and CI pipeline
- Added TypeScript build cache to .gitignore. - Introduced SECURITY.md for vulnerability reporting and security policy. - Updated CI workflow to include explicit permissions and type-checking step. - Enhanced .vscode/settings.json for improved development experience. - Updated changelog to reflect recent changes and improvements.
1 parent 5af786f commit 1c3c30e

6 files changed

Lines changed: 103 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest
@@ -27,13 +30,23 @@ jobs:
2730
run: pnpm install --frozen-lockfile
2831

2932
- name: Audit dependencies
30-
run: pnpm audit
33+
run: pnpm audit --audit-level=high
34+
35+
- name: Type check
36+
run: pnpm exec tsc --noEmit
3137

3238
- name: Run linter
3339
run: pnpm lint
3440

35-
- name: Run tests
36-
run: pnpm test -- --run
41+
- name: Run tests with coverage
42+
run: pnpm test:coverage -- --run
43+
44+
- name: Upload coverage report
45+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
46+
with:
47+
name: coverage-report
48+
path: coverage/
49+
retention-days: 7
3750

3851
- name: Build
3952
run: pnpm build

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ dist-ssr
1313
*.local
1414
coverage
1515

16+
# TypeScript build cache
17+
*.tsbuildinfo
18+
1619
# Editor directories and files
1720
.vscode/*
1821
!.vscode/extensions.json
22+
!.vscode/settings.json
1923
.idea
2024
.DS_Store
2125
*.suo

‎.vscode/settings.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.tabSize": 2,
5+
"editor.insertSpaces": true,
6+
"editor.trimAutoWhitespace": true,
7+
"editor.rulers": [100],
8+
"editor.codeActionsOnSave": {
9+
"source.fixAll.eslint": "explicit"
10+
},
11+
12+
"js/ts.tsdk": "node_modules/typescript/lib",
13+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
14+
"js/ts.preferences.importModuleSpecifier": "shortest",
15+
16+
"eslint.useFlatConfig": true,
17+
18+
"files.exclude": {
19+
"**/.git": true,
20+
"**/node_modules": true,
21+
"**/dist": true,
22+
"**/.pnpm-store": true
23+
},
24+
"search.exclude": {
25+
"**/node_modules": true,
26+
"**/dist": true,
27+
"**/coverage": true,
28+
"pnpm-lock.yaml": true
29+
},
30+
31+
"[scss]": {
32+
"editor.defaultFormatter": "esbenp.prettier-vscode"
33+
},
34+
35+
"[markdown]": {
36+
"editor.wordWrap": "on"
37+
}
38+
}

‎CHANGELOG.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Security
1111

12-
- SHA pinning de toutes les GitHub Actions (checkout v5.1.0, setup-node v4.4.0, pnpm/action-setup v6.0.10, softprops/action-gh-release v2.3.2)
12+
- SHA pinning de toutes les GitHub Actions (checkout v5.1.0, setup-node v4.4.0, pnpm/action-setup v6.0.10, softprops/action-gh-release v2.3.2, upload-artifact v4.6.2)
13+
- `permissions: contents: read` explicite sur le workflow CI (principe du moindre privilège)
14+
- `pnpm audit --audit-level=high` dans la CI pour bloquer uniquement les vulnérabilités critiques
15+
- Ajout de `SECURITY.md` avec politique de divulgation responsable
1316

1417
### Added
1518

1619
- Hook `pre-push` Husky : type-check TypeScript (`tsc --noEmit`) + suite de tests complète avant chaque push
17-
- `.vscode/extensions.json` : recommandations d'extensions VS Code pour le projet
20+
- `.vscode/extensions.json` : recommandations d'extensions VS Code ciblées pour ce projet
21+
- `.vscode/settings.json` : formatOnSave, TS SDK workspace, ESLint fix on save, rulers à 100 chars
1822
- Bundle analyzer via `rollup-plugin-visualizer` (script `build:analyze`)
23+
- Étape `tsc --noEmit` explicite dans la CI pour un feedback d'erreur de type clair
24+
- Upload du rapport de coverage en artifact CI (retention 7 jours)
1925

2026
### Changed
2127

22-
- `verbatimModuleSyntax` activé dans `tsconfig.json` pour forcer `import type` explicite
28+
- `verbatimModuleSyntax` activé dans `tsconfig.json` et `tsconfig.node.json` pour forcer `import type` explicite
2329

2430
## [3.3.0] - 2026-08-13
2531

‎SECURITY.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Only the latest release of Simplistic Tetris receives security updates.
6+
7+
| Version | Supported |
8+
| ------- | --------- |
9+
| Latest | ✅ |
10+
| Older | ❌ |
11+
12+
## Reporting a Vulnerability
13+
14+
**Please do not open a public issue for security vulnerabilities.**
15+
16+
Use GitHub's private vulnerability reporting:
17+
👉 [Report a vulnerability](https://github.com/KevOneRedOne/Simplistic-Tetris/security/advisories/new)
18+
19+
### What to include
20+
21+
- Description of the vulnerability
22+
- Steps to reproduce
23+
- Potential impact
24+
- Suggested fix (optional)
25+
26+
### Response timeline
27+
28+
| Step | Timeframe |
29+
|------|-----------|
30+
| Acknowledgement | Within 48 hours |
31+
| Assessment | Within 7 days |
32+
| Fix & release | Depends on severity |
33+
34+
Security fixes are released as patch versions and disclosed in the [CHANGELOG](./CHANGELOG.md).

‎tsconfig.node.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"skipLibCheck": true,
55
"module": "ESNext",
66
"moduleResolution": "bundler",
7-
"allowSyntheticDefaultImports": true
7+
"allowSyntheticDefaultImports": true,
8+
"verbatimModuleSyntax": true
89
},
910
"include": ["vite.config.ts"]
1011
}

0 commit comments

Comments
 (0)