@vpnsin/devkit 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +318 -0
  2. package/bin/cli.js +431 -0
  3. package/commitlint/index.js +7 -0
  4. package/eslint/base.js +50 -0
  5. package/eslint/next.js +27 -0
  6. package/jest/index.js +20 -0
  7. package/lint-staged/index.js +8 -0
  8. package/package.json +80 -0
  9. package/prettier/index.js +11 -0
  10. package/templates/README.template.md +51 -0
  11. package/templates/app/backend/Dockerfile +24 -0
  12. package/templates/app/backend/dockerignore +7 -0
  13. package/templates/app/backend/env.example +2 -0
  14. package/templates/app/backend/src/app.ts +22 -0
  15. package/templates/app/backend/src/env.ts +8 -0
  16. package/templates/app/backend/src/routes/health.ts +7 -0
  17. package/templates/app/backend/src/server.ts +19 -0
  18. package/templates/app/frontend/app/globals.css +28 -0
  19. package/templates/app/frontend/app/layout.tsx +16 -0
  20. package/templates/app/frontend/app/page.tsx +10 -0
  21. package/templates/app/frontend/env.example +5 -0
  22. package/templates/app/frontend/next.config.mjs +6 -0
  23. package/templates/claude/skills/design-craft/SKILL.md +226 -0
  24. package/templates/cspell.json +30 -0
  25. package/templates/dependabot.yml +18 -0
  26. package/templates/editorconfig +15 -0
  27. package/templates/github/CODEOWNERS +12 -0
  28. package/templates/github/CONTRIBUTING.md +51 -0
  29. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +34 -0
  30. package/templates/github/ISSUE_TEMPLATE/config.yml +5 -0
  31. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +23 -0
  32. package/templates/github/PULL_REQUEST_TEMPLATE.md +27 -0
  33. package/templates/github/SECURITY.md +24 -0
  34. package/templates/github/workflows/ci.yml +55 -0
  35. package/templates/github/workflows/codeql.yml +35 -0
  36. package/templates/github/workflows/dependency-review.yml +23 -0
  37. package/templates/github/workflows/lighthouse.yml +39 -0
  38. package/templates/github/workflows/publish.yml +38 -0
  39. package/templates/github/workflows/release-please-publish.yml +54 -0
  40. package/templates/github/workflows/release-please.yml +22 -0
  41. package/templates/github/workflows/scorecard.yml +41 -0
  42. package/templates/github/workflows/sonarqube.yml +31 -0
  43. package/templates/github/workflows/trivy.yml +43 -0
  44. package/templates/husky/commit-msg +1 -0
  45. package/templates/husky/pre-commit +1 -0
  46. package/templates/lighthouserc.json +23 -0
  47. package/templates/markdownlint-cli2.jsonc +20 -0
  48. package/templates/npmrc +9 -0
  49. package/templates/nvmrc +1 -0
  50. package/templates/release-please-config.json +14 -0
  51. package/templates/sonar-project.properties +13 -0
  52. package/templates/vscode/extensions.json +53 -0
  53. package/templates/vscode/settings.json +70 -0
  54. package/tsconfig/base.json +17 -0
  55. package/tsconfig/next.json +16 -0
  56. package/tsconfig/node.json +14 -0
  57. package/vitest/index.js +22 -0
@@ -0,0 +1,24 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
5
+ The latest released version on the default branch receives security updates.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ **Please do not open a public issue for security problems.**
10
+
11
+ Report privately through GitHub's
12
+ [private vulnerability reporting](https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability)
13
+ (repository **Security** tab → **Report a vulnerability**), or email
14
+ **<security@example.com>**. <!-- TODO: set your security contact -->
15
+
16
+ Please include:
17
+
18
+ - affected version(s) and environment,
19
+ - steps to reproduce / proof of concept,
20
+ - impact assessment.
21
+
22
+ We aim to acknowledge reports within **48 hours** and to share a remediation
23
+ timeline after triage. Please give us a reasonable window to fix the issue
24
+ before any public disclosure.
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ quality:
18
+ name: Lint, type-check & build
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v6
23
+
24
+ - name: Setup Node
25
+ uses: actions/setup-node@v6
26
+ with:
27
+ node-version-file: .nvmrc
28
+ cache: npm
29
+
30
+ - name: Install dependencies
31
+ run: npm ci
32
+
33
+ # Free dependency vulnerability check — works on public and private repos,
34
+ # and stands in for GHAS Dependency Review on private repos. Non-blocking.
35
+ - name: Audit dependencies
36
+ run: npm audit --audit-level=high
37
+ continue-on-error: true
38
+
39
+ - name: Type-check
40
+ run: npm run type-check --if-present
41
+
42
+ - name: Lint (ESLint)
43
+ run: npm run lint --if-present
44
+
45
+ - name: Lint (Markdown)
46
+ run: npm run lint:md --if-present
47
+
48
+ - name: Prettier check
49
+ run: npm run format:check --if-present
50
+
51
+ - name: Build
52
+ run: npm run build --if-present
53
+
54
+ - name: Test
55
+ run: npm test --if-present
@@ -0,0 +1,35 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: '0 6 * * 1' # weekly, Mondays 06:00 UTC
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ analyze:
16
+ name: Analyze (javascript-typescript)
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ security-events: write
20
+ actions: read
21
+ contents: read
22
+ steps:
23
+ - name: Checkout
24
+ uses: actions/checkout@v6
25
+
26
+ - name: Initialize CodeQL
27
+ uses: github/codeql-action/init@v4
28
+ with:
29
+ languages: javascript-typescript
30
+ queries: security-extended
31
+
32
+ - name: Perform CodeQL Analysis
33
+ uses: github/codeql-action/analyze@v4
34
+ with:
35
+ category: '/language:javascript-typescript'
@@ -0,0 +1,23 @@
1
+ name: Dependency Review
2
+
3
+ # Flags vulnerable or disallowed dependencies introduced in a pull request.
4
+ # (GitHub Advanced Security — free on public repos.)
5
+ on:
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ dependency-review:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v6
18
+
19
+ - name: Dependency Review
20
+ uses: actions/dependency-review-action@v5
21
+ with:
22
+ fail-on-severity: high
23
+ comment-summary-in-pr: on-failure
@@ -0,0 +1,39 @@
1
+ name: Lighthouse
2
+
3
+ # Lighthouse CI on pull requests — performance, accessibility, best-practices
4
+ # and SEO. Builds the app, serves it, audits the URLs in lighthouserc.json, and
5
+ # posts a public report link in the run logs.
6
+ # Opt-in: NOT installed by `devkit init` unless you pass --lighthouse.
7
+ on:
8
+ pull_request:
9
+ branches: [main, dev]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ lighthouse:
16
+ name: Lighthouse CI
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v6
21
+
22
+ - name: Setup Node
23
+ uses: actions/setup-node@v6
24
+ with:
25
+ node-version-file: .nvmrc
26
+ cache: npm
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Build
32
+ run: npm run build --if-present
33
+
34
+ - name: Run Lighthouse CI
35
+ uses: treosh/lighthouse-ci-action@v12
36
+ with:
37
+ configPath: ./lighthouserc.json
38
+ uploadArtifacts: true
39
+ temporaryPublicStorage: true
@@ -0,0 +1,38 @@
1
+ name: Publish (manual)
2
+
3
+ # Manual npm publish / re-publish of the version currently in package.json.
4
+ # Use to recover a release whose auto-publish failed (e.g. a bad NPM_TOKEN), or
5
+ # to publish out of band. Normal releases publish automatically from the
6
+ # release-please workflow when its PR is merged. Opt-in: only installed by
7
+ # `devkit init --publish`. For a private/scoped package, adjust `--access`.
8
+ on:
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+ id-token: write # npm provenance
14
+
15
+ jobs:
16
+ publish:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v6
21
+
22
+ - name: Setup Node
23
+ uses: actions/setup-node@v6
24
+ with:
25
+ node-version-file: .nvmrc
26
+ registry-url: 'https://registry.npmjs.org'
27
+ cache: npm
28
+
29
+ - name: Install dependencies
30
+ run: npm ci
31
+
32
+ - name: Build
33
+ run: npm run build --if-present
34
+
35
+ - name: Publish
36
+ run: npm publish --provenance --access public
37
+ env:
38
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,54 @@
1
+ name: Release Please
2
+
3
+ # Maintains a release PR from Conventional Commits; merging it bumps the version,
4
+ # updates CHANGELOG.md, creates a GitHub release + tag, and publishes to npm.
5
+ # Publish is integrated here (rather than a separate `on: release` workflow)
6
+ # because a release created by GITHUB_TOKEN does not trigger other workflows.
7
+ # Requires an NPM_TOKEN repo secret (an npm automation token).
8
+ on:
9
+ push:
10
+ branches: [main]
11
+
12
+ permissions:
13
+ contents: write
14
+ pull-requests: write
15
+ id-token: write # npm provenance
16
+
17
+ jobs:
18
+ release-please:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Run release-please
22
+ id: release
23
+ uses: googleapis/release-please-action@v5
24
+ with:
25
+ token: ${{ secrets.GITHUB_TOKEN }}
26
+ config-file: release-please-config.json
27
+ manifest-file: .release-please-manifest.json
28
+
29
+ # Publish to npm only when a release was just created (the release PR merged).
30
+ - name: Checkout
31
+ if: ${{ steps.release.outputs.release_created }}
32
+ uses: actions/checkout@v6
33
+
34
+ - name: Setup Node
35
+ if: ${{ steps.release.outputs.release_created }}
36
+ uses: actions/setup-node@v6
37
+ with:
38
+ node-version-file: .nvmrc
39
+ registry-url: 'https://registry.npmjs.org'
40
+ cache: npm
41
+
42
+ - name: Install dependencies
43
+ if: ${{ steps.release.outputs.release_created }}
44
+ run: npm ci
45
+
46
+ - name: Build
47
+ if: ${{ steps.release.outputs.release_created }}
48
+ run: npm run build --if-present
49
+
50
+ - name: Publish to npm
51
+ if: ${{ steps.release.outputs.release_created }}
52
+ run: npm publish --provenance --access public
53
+ env:
54
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,22 @@
1
+ name: Release Please
2
+
3
+ # Maintains a release PR from Conventional Commits; merging it bumps the version
4
+ # in package.json, updates CHANGELOG.md, and creates a GitHub release + git tag.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: write
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ release-please:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Run release-please
18
+ uses: googleapis/release-please-action@v5
19
+ with:
20
+ token: ${{ secrets.GITHUB_TOKEN }}
21
+ config-file: release-please-config.json
22
+ manifest-file: .release-please-manifest.json
@@ -0,0 +1,41 @@
1
+ name: Scorecard
2
+
3
+ # OSSF Scorecard — supply-chain security posture (branch protection, pinned
4
+ # actions, token permissions, etc.). Best suited to PUBLIC repos; on private
5
+ # repos it needs a PAT with repo + read:org scopes in `repo_token`.
6
+ # Opt-in: this workflow is NOT installed by `devkit init` by default.
7
+ on:
8
+ branch_protection_rule:
9
+ schedule:
10
+ - cron: '0 8 * * 1' # weekly, Mondays 08:00 UTC
11
+ push:
12
+ branches: [main]
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ analysis:
19
+ name: Scorecard analysis
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ security-events: write
23
+ id-token: write
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v6
27
+ with:
28
+ persist-credentials: false
29
+
30
+ - name: Run analysis
31
+ uses: ossf/scorecard-action@v2.4.1
32
+ with:
33
+ results_file: results.sarif
34
+ results_format: sarif
35
+ publish_results: true
36
+
37
+ - name: Upload results to code scanning
38
+ uses: github/codeql-action/upload-sarif@v4
39
+ with:
40
+ sarif_file: results.sarif
41
+ category: scorecard
@@ -0,0 +1,31 @@
1
+ name: SonarCloud
2
+
3
+ # CI-based SonarCloud (SonarQube Cloud) analysis. Requires:
4
+ # 1. a SONAR_TOKEN repo secret (SonarCloud → My Account → Security → token), and
5
+ # 2. Automatic Analysis turned OFF in SonarCloud (project → Administration →
6
+ # Analysis Method) — CI and Automatic Analysis cannot both run.
7
+ # Project keys live in sonar-project.properties.
8
+ on:
9
+ push:
10
+ branches: [main]
11
+ pull_request:
12
+ branches: [main, dev]
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ sonarcloud:
19
+ name: SonarCloud scan
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v6
24
+ with:
25
+ fetch-depth: 0 # full history improves new-code detection & blame
26
+
27
+ - name: SonarCloud scan
28
+ uses: SonarSource/sonarqube-scan-action@v8.1.0
29
+ env:
30
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
31
+ SONAR_HOST_URL: https://sonarcloud.io
@@ -0,0 +1,43 @@
1
+ name: Trivy
2
+
3
+ # Scans the repo's dependencies, IaC/config and committed secrets, and uploads
4
+ # results to GitHub code scanning (Security tab). Works on any repo — no
5
+ # container image required.
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+ branches: [main, dev]
11
+ schedule:
12
+ - cron: '0 7 * * 1' # weekly, Mondays 07:00 UTC
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ scan:
19
+ name: Filesystem scan
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ security-events: write # upload SARIF to code scanning
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v6
27
+
28
+ - name: Run Trivy
29
+ uses: aquasecurity/trivy-action@v0.36.0
30
+ with:
31
+ scan-type: fs
32
+ scanners: vuln,secret,misconfig
33
+ format: sarif
34
+ output: trivy-results.sarif
35
+ severity: CRITICAL,HIGH
36
+ ignore-unfixed: true
37
+
38
+ - name: Upload results to code scanning
39
+ uses: github/codeql-action/upload-sarif@v4
40
+ if: always()
41
+ with:
42
+ sarif_file: trivy-results.sarif
43
+ category: trivy
@@ -0,0 +1 @@
1
+ npx --no-install commitlint --edit "$1"
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -0,0 +1,23 @@
1
+ {
2
+ "ci": {
3
+ "collect": {
4
+ "startServerCommand": "npm run start",
5
+ "startServerReadyPattern": "ready|started|listening|Local:|localhost",
6
+ "startServerReadyTimeout": 60000,
7
+ "url": ["http://localhost:3000/"],
8
+ "numberOfRuns": 3,
9
+ "settings": { "preset": "desktop" }
10
+ },
11
+ "assert": {
12
+ "assertions": {
13
+ "categories:performance": ["warn", { "minScore": 0.9 }],
14
+ "categories:accessibility": ["error", { "minScore": 0.9 }],
15
+ "categories:best-practices": ["warn", { "minScore": 0.9 }],
16
+ "categories:seo": ["warn", { "minScore": 0.9 }]
17
+ }
18
+ },
19
+ "upload": {
20
+ "target": "temporary-public-storage"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ // Tuned to coexist with Prettier (which owns whitespace/wrapping).
3
+ "config": {
4
+ "default": true,
5
+ "MD013": false, // line length — Prettier/readability decides wrapping
6
+ "MD033": false, // allow inline HTML
7
+ "MD036": false, // intentional bold (taglines, "Last updated:") is not a heading
8
+ "MD041": false, // first line need not be a top-level heading
9
+ "MD024": { "siblings_only": true } // duplicate headings ok across sections
10
+ },
11
+ "globs": ["**/*.md"],
12
+ "ignores": [
13
+ "node_modules",
14
+ ".next",
15
+ "dist",
16
+ "build",
17
+ "CHANGELOG.md",
18
+ ".github/**/*.md"
19
+ ]
20
+ }
@@ -0,0 +1,9 @@
1
+ # Fail the install when the local Node/npm doesn't satisfy package.json "engines".
2
+ engine-strict=true
3
+
4
+ # Quieter installs.
5
+ fund=false
6
+
7
+ # Reproducible installs — uncomment for applications.
8
+ # Leave commented for published libraries so consumers keep semver ranges.
9
+ # save-exact=true
@@ -0,0 +1 @@
1
+ 22
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "packages": {
4
+ ".": {
5
+ "release-type": "node",
6
+ "changelog-path": "CHANGELOG.md",
7
+ "bump-minor-pre-major": true,
8
+ "bump-patch-for-minor-pre-major": true,
9
+ "include-component-in-tag": false,
10
+ "draft": false,
11
+ "prerelease": false
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,13 @@
1
+ # SonarCloud / SonarQube Cloud project config.
2
+ # Find the org & project keys in SonarCloud → your project → Information.
3
+ sonar.organization=YOUR_SONAR_ORG
4
+ sonar.projectKey=YOUR_ORG_YOUR_REPO
5
+ # sonar.projectName=Your Project
6
+
7
+ sonar.sources=.
8
+ sonar.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/.next/**,**/coverage/**
9
+
10
+ # If you generate LCOV coverage, point Sonar at it:
11
+ # sonar.javascript.lcov.reportPaths=coverage/lcov.info
12
+
13
+ sonar.sourceEncoding=UTF-8
@@ -0,0 +1,53 @@
1
+ {
2
+ "recommendations": [
3
+ // ── Formatting, linting & spell-check (the toolchain devkit wires up) ──
4
+ "esbenp.prettier-vscode",
5
+ "dbaeumer.vscode-eslint",
6
+ "DavidAnson.vscode-markdownlint",
7
+ "streetsidesoftware.code-spell-checker",
8
+ "EditorConfig.EditorConfig",
9
+
10
+ // ── Diagnostics & DX ──
11
+ "usernamehw.errorlens",
12
+ "yoavbls.pretty-ts-errors",
13
+ "wix.vscode-import-cost",
14
+
15
+ // ── JavaScript / TypeScript / React authoring ──
16
+ "dsznajder.es7-react-js-snippets",
17
+ "formulahendry.auto-rename-tag",
18
+ "christian-kohler.npm-intellisense",
19
+ "christian-kohler.path-intellisense",
20
+ "wmaurer.change-case",
21
+
22
+ // ── Testing (Jest; pairs with `devkit init --jest`) ──
23
+ "orta.vscode-jest",
24
+ "firsttris.vscode-jest-runner",
25
+ "andys8.jest-snippets",
26
+
27
+ // ── Git & GitHub (devkit ships PR templates, governance & GH workflows) ──
28
+ "eamodio.gitlens",
29
+ "donjayamanne.githistory",
30
+ "ziyasal.vscode-open-in-github",
31
+ "github.vscode-pull-request-github",
32
+
33
+ // ── Code quality (pairs with `devkit init --sonar`) ──
34
+ "sonarsource.sonarlint-vscode",
35
+
36
+ // ── File-type support shipped by this scaffold ──
37
+ "mikestead.dotenv",
38
+ "redhat.vscode-yaml",
39
+ "github.vscode-github-actions",
40
+
41
+ // ── Markdown & docs ──
42
+ "yzhang.markdown-all-in-one",
43
+ "bierner.markdown-mermaid",
44
+ "tom-latham.markdown-pdf-plus",
45
+
46
+ // ── Productivity & navigation ──
47
+ "gruntfuggly.todo-tree",
48
+ "hediet.vscode-drawio",
49
+ "l13rary.l13-diff",
50
+ "bokuweb.vscode-ripgrep",
51
+ "ritwickdey.liveserver"
52
+ ]
53
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ // ── Formatting (Prettier owns it) ──────────────────────────────────────────
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
4
+ "editor.formatOnSave": true,
5
+ "editor.formatOnPaste": false,
6
+ // Only format when a Prettier config is found, so unconfigured files are left alone.
7
+ "prettier.requireConfig": true,
8
+
9
+ // ── Editor basics (match .editorconfig + Prettier printWidth) ──────────────
10
+ "editor.tabSize": 2,
11
+ "editor.detectIndentation": false,
12
+ "editor.rulers": [100],
13
+ "editor.bracketPairColorization.enabled": true,
14
+ "editor.guides.bracketPairs": "active",
15
+ // Rename paired HTML/JSX tags together as you type.
16
+ "editor.linkedEditing": true,
17
+
18
+ // ── Lint fixes on save ─────────────────────────────────────────────────────
19
+ "editor.codeActionsOnSave": {
20
+ "source.fixAll.eslint": "explicit"
21
+ },
22
+ "eslint.useFlatConfig": true,
23
+ "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
24
+
25
+ // ── Files ──────────────────────────────────────────────────────────────────
26
+ "files.eol": "\n",
27
+ "files.insertFinalNewline": true,
28
+ "files.trimTrailingWhitespace": true,
29
+ "search.exclude": {
30
+ "**/node_modules": true,
31
+ "**/dist": true,
32
+ "**/build": true,
33
+ "**/coverage": true,
34
+ "**/.next": true
35
+ },
36
+
37
+ // ── Diffs & reviews ────────────────────────────────────────────────────────
38
+ // Show whitespace-only changes in diffs (matters since we trim on save).
39
+ "diffEditor.ignoreTrimWhitespace": false,
40
+
41
+ // ── TypeScript / JavaScript ────────────────────────────────────────────────
42
+ // Use the project's own TypeScript, not VS Code's bundled version.
43
+ "typescript.tsdk": "node_modules/typescript/lib",
44
+ "typescript.enablePromptUseWorkspaceTsdk": true,
45
+ "typescript.updateImportsOnFileMove.enabled": "always",
46
+ "javascript.updateImportsOnFileMove.enabled": "always",
47
+ "typescript.preferences.preferTypeOnlyAutoImports": true,
48
+ "typescript.preferences.importModuleSpecifier": "shortest",
49
+ "typescript.suggest.autoImports": true,
50
+
51
+ // ── Per-language formatters ────────────────────────────────────────────────
52
+ "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
53
+ "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
54
+ "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
55
+ "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
56
+ "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
57
+ "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
58
+ "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
59
+ "[scss]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
60
+ "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
61
+ "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
62
+ "[github-actions-workflow]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
63
+ "[dockercompose]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
64
+ "[markdown]": {
65
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
66
+ "editor.codeActionsOnSave": {
67
+ "source.fixAll.markdownlint": "explicit"
68
+ }
69
+ }
70
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "devkit base",
4
+ "_comment": "Framework-agnostic strict base. Extend a variant (node/next) or this directly.",
5
+ "compilerOptions": {
6
+ "target": "ES2022",
7
+ "strict": true,
8
+ "noUncheckedIndexedAccess": true,
9
+ "noImplicitOverride": true,
10
+ "noFallthroughCasesInSwitch": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true
16
+ }
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "devkit next",
4
+ "_comment": "For Next.js apps (App Router). Add your own paths/include in the repo tsconfig.",
5
+ "extends": "./base.json",
6
+ "compilerOptions": {
7
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
8
+ "module": "ESNext",
9
+ "moduleResolution": "Bundler",
10
+ "jsx": "preserve",
11
+ "noEmit": true,
12
+ "allowJs": true,
13
+ "incremental": true,
14
+ "plugins": [{ "name": "next" }]
15
+ }
16
+ }