spoko-design-system 1.30.2 → 1.32.0

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 (97) hide show
  1. package/.claude/settings.json +48 -48
  2. package/.github/dependabot.yml +11 -11
  3. package/.github/todo.yml +3 -3
  4. package/.github/workflows/claude.yml +37 -37
  5. package/.github/workflows/code-quality.yml +72 -72
  6. package/.github/workflows/deploy.yml +42 -42
  7. package/.husky/README.md +41 -41
  8. package/.husky/commit-msg +1 -1
  9. package/.husky/pre-commit +41 -41
  10. package/.nvmrc +1 -1
  11. package/.prettierignore +14 -14
  12. package/.prettierrc +30 -30
  13. package/.stackblitzrc +5 -5
  14. package/.vscode/extensions.json +4 -4
  15. package/.vscode/launch.json +11 -11
  16. package/.vscode/settings.json +25 -25
  17. package/CHANGELOG.md +690 -665
  18. package/CLAUDE.md +290 -290
  19. package/LICENSE +21 -21
  20. package/MIGRATION-COLORS.md +110 -110
  21. package/README.md +303 -303
  22. package/TOOLTIPS.md +236 -236
  23. package/astro.config.mjs +85 -85
  24. package/commitlint.config.js +3 -3
  25. package/dev-dist/sw.js +91 -91
  26. package/dev-dist/workbox-c676b6d3.js +3391 -3391
  27. package/eslint.config.js +69 -69
  28. package/icon.config.ts +348 -348
  29. package/index.ts +78 -78
  30. package/netlify.toml +6 -6
  31. package/package.json +164 -164
  32. package/public/arrow-bottom.svg +7 -7
  33. package/public/fonts/lg.svg +53 -53
  34. package/public/fonts/vwhead-bold-demo.html +549 -549
  35. package/public/fonts/vwhead-regular-demo.html +549 -549
  36. package/public/fonts/vwtext-bold-demo.html +549 -549
  37. package/public/fonts/vwtext-regular-demo.html +549 -549
  38. package/public/github.svg +3 -3
  39. package/public/grid_dot.svg +4 -4
  40. package/public/linkedin.svg +44 -44
  41. package/public/make-scrollable-code-focusable.js +3 -3
  42. package/public/pagefind.yml +3 -3
  43. package/public/polo.blue.svg +29 -29
  44. package/public/spoko.space.svg +71 -71
  45. package/public/twitter.svg +46 -46
  46. package/renovate.json +6 -6
  47. package/sandbox.config.json +11 -11
  48. package/sonar-project.properties +26 -26
  49. package/src/components/Product/ProductGallery.astro +310 -320
  50. package/src/components/Product/product-gallery.css +2 -18
  51. package/src/pages/components/badges.mdx +57 -57
  52. package/src/pages/components/breadcrumbs.mdx +168 -168
  53. package/src/pages/components/buttons.mdx +359 -359
  54. package/src/pages/components/card.mdx +294 -294
  55. package/src/pages/components/carousel.mdx +62 -62
  56. package/src/pages/components/copyright.mdx +42 -42
  57. package/src/pages/components/details-list.mdx +207 -207
  58. package/src/pages/components/features-list.mdx +37 -37
  59. package/src/pages/components/flags.mdx +49 -49
  60. package/src/pages/components/fuck-russia.mdx +39 -39
  61. package/src/pages/components/hand-drive.mdx +78 -78
  62. package/src/pages/components/headline.mdx +337 -337
  63. package/src/pages/components/image.mdx +513 -513
  64. package/src/pages/components/input.mdx +367 -367
  65. package/src/pages/components/jumbotron.mdx +530 -530
  66. package/src/pages/components/modal.mdx +212 -212
  67. package/src/pages/components/post-header.mdx +64 -64
  68. package/src/pages/components/pr-code.mdx +213 -213
  69. package/src/pages/components/product-engine.mdx +418 -418
  70. package/src/pages/components/product-gallery.mdx +179 -179
  71. package/src/pages/components/product-number.mdx +66 -66
  72. package/src/pages/components/product-tile.mdx +51 -51
  73. package/src/pages/components/quote.mdx +33 -33
  74. package/src/pages/components/slimbanner.mdx +260 -260
  75. package/src/pages/components/table.mdx +108 -108
  76. package/src/pages/core/colors.mdx +21 -21
  77. package/src/pages/core/grid.mdx +193 -193
  78. package/src/pages/core/introduction.mdx +77 -77
  79. package/src/pages/core/tooltips.mdx +491 -491
  80. package/src/pages/patterns/introduction.mdx +60 -60
  81. package/src/styles/_variables.scss +70 -70
  82. package/tailwind.config.cjs +8 -8
  83. package/tsconfig.json +28 -28
  84. package/uno-config/index.ts +301 -301
  85. package/uno-config/theme/breakpoints.ts +9 -9
  86. package/uno-config/theme/colors.ts +69 -69
  87. package/uno-config/theme/dimensions.ts +17 -17
  88. package/uno-config/theme/effects.ts +15 -15
  89. package/uno-config/theme/grid.ts +10 -10
  90. package/uno-config/theme/index.ts +26 -26
  91. package/uno-config/theme/shortcuts/buttons.ts +53 -53
  92. package/uno-config/theme/shortcuts/components.ts +126 -125
  93. package/uno-config/theme/shortcuts/index.ts +20 -20
  94. package/uno-config/theme/shortcuts/jumbotron.ts +71 -71
  95. package/uno-config/theme/shortcuts/layout.ts +75 -75
  96. package/uno-config/theme/typography.ts +29 -29
  97. package/uno.config.ts +2 -2
@@ -1,49 +1,49 @@
1
- {
2
- "includeCoAuthoredBy": false,
3
- "permissions": {
4
- "allow": [
5
- "Bash(pnpm dev:*)",
6
- "Bash(pnpm start:*)",
7
- "Bash(pnpm build:*)",
8
- "Bash(pnpm preview:*)",
9
- "Bash(pnpm check:*)",
10
- "Bash(pnpm lint:*)",
11
- "Bash(pnpm format:*)",
12
- "Bash(git status:*)",
13
- "Bash(git diff:*)",
14
- "Bash(git log:*)",
15
- "Bash(git add:*)",
16
- "Bash(git commit:*)",
17
- "Bash(git push:*)"
18
- ],
19
- "deny": [
20
- "Bash(pnpm semantic-release:*)",
21
- "Bash(pnpm publish:*)",
22
- "Bash(npm publish:*)"
23
- ],
24
- "ask": [
25
- "Bash(rm:*)",
26
- "Bash(pnpm install:*)",
27
- "Bash(pnpm add:*)",
28
- "Bash(pnpm remove:*)",
29
- "Bash(git branch:*)",
30
- "Bash(git checkout:*)",
31
- "Bash(git merge:*)",
32
- "Bash(git rebase:*)"
33
- ]
34
- },
35
- "additionalInstructions": "## Project-Specific Instructions\n\n### Component Development\n- When creating new components, always export them from root `index.ts` (not from `src/`)\n- Use the path pattern: `export { default as Name } from './src/components/Name.vue'`\n- Add documentation page in `src/pages/components/` with `.mdx` extension\n- Update `src/config.ts` SIDEBAR array with navigation entry\n\n### UnoCSS Modifications\n- Never edit root `uno.config.ts` directly (it's just a wrapper)\n- Make theme changes in `uno-config/theme/` files\n- Add shortcuts to appropriate file in `uno-config/theme/shortcuts/`\n- When adding icons, update `icon.config.ts` include array\n\n### Commit Messages\n- This project uses semantic-release with conventional commits\n- Format: `<type>[scope]: <description>`\n- Types: feat (minor), fix (patch), docs (patch), chore (no release)\n- Breaking changes: Add `BREAKING CHANGE:` footer for major version\n- Examples:\n - `feat(components): add new Modal component`\n - `fix(Input): resolve floating label z-index issue`\n - `docs: update Button examples`\n\n### Code Quality\n- Run `pnpm lint:fix` before committing\n- Run `pnpm format` to auto-format code\n- Run `pnpm check` for Astro type checking\n- Ensure components work in both contexts: as npm package and in docs site\n\n### Path Conventions\n- Use TypeScript path aliases: `@components/`, `@utils/`, `@types/`\n- In root `index.ts`, always use `./src/` prefix\n- Within `src/`, use aliases or relative paths\n\n### Testing Changes\n- Start dev server with `pnpm dev` (runs on port 1234)\n- Preview production build with `pnpm preview`\n- Check build output with `pnpm build`",
36
- "customInstructions": {
37
- "autoApprove": {
38
- "patterns": [
39
- "*.vue",
40
- "*.astro",
41
- "*.ts",
42
- "*.js",
43
- "*.mdx",
44
- "src/**/*",
45
- "uno-config/**/*"
46
- ]
47
- }
48
- }
1
+ {
2
+ "includeCoAuthoredBy": false,
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(pnpm dev:*)",
6
+ "Bash(pnpm start:*)",
7
+ "Bash(pnpm build:*)",
8
+ "Bash(pnpm preview:*)",
9
+ "Bash(pnpm check:*)",
10
+ "Bash(pnpm lint:*)",
11
+ "Bash(pnpm format:*)",
12
+ "Bash(git status:*)",
13
+ "Bash(git diff:*)",
14
+ "Bash(git log:*)",
15
+ "Bash(git add:*)",
16
+ "Bash(git commit:*)",
17
+ "Bash(git push:*)"
18
+ ],
19
+ "deny": [
20
+ "Bash(pnpm semantic-release:*)",
21
+ "Bash(pnpm publish:*)",
22
+ "Bash(npm publish:*)"
23
+ ],
24
+ "ask": [
25
+ "Bash(rm:*)",
26
+ "Bash(pnpm install:*)",
27
+ "Bash(pnpm add:*)",
28
+ "Bash(pnpm remove:*)",
29
+ "Bash(git branch:*)",
30
+ "Bash(git checkout:*)",
31
+ "Bash(git merge:*)",
32
+ "Bash(git rebase:*)"
33
+ ]
34
+ },
35
+ "additionalInstructions": "## Project-Specific Instructions\n\n### Component Development\n- When creating new components, always export them from root `index.ts` (not from `src/`)\n- Use the path pattern: `export { default as Name } from './src/components/Name.vue'`\n- Add documentation page in `src/pages/components/` with `.mdx` extension\n- Update `src/config.ts` SIDEBAR array with navigation entry\n\n### UnoCSS Modifications\n- Never edit root `uno.config.ts` directly (it's just a wrapper)\n- Make theme changes in `uno-config/theme/` files\n- Add shortcuts to appropriate file in `uno-config/theme/shortcuts/`\n- When adding icons, update `icon.config.ts` include array\n\n### Commit Messages\n- This project uses semantic-release with conventional commits\n- Format: `<type>[scope]: <description>`\n- Types: feat (minor), fix (patch), docs (patch), chore (no release)\n- Breaking changes: Add `BREAKING CHANGE:` footer for major version\n- Examples:\n - `feat(components): add new Modal component`\n - `fix(Input): resolve floating label z-index issue`\n - `docs: update Button examples`\n\n### Code Quality\n- Run `pnpm lint:fix` before committing\n- Run `pnpm format` to auto-format code\n- Run `pnpm check` for Astro type checking\n- Ensure components work in both contexts: as npm package and in docs site\n\n### Path Conventions\n- Use TypeScript path aliases: `@components/`, `@utils/`, `@types/`\n- In root `index.ts`, always use `./src/` prefix\n- Within `src/`, use aliases or relative paths\n\n### Testing Changes\n- Start dev server with `pnpm dev` (runs on port 1234)\n- Preview production build with `pnpm preview`\n- Check build output with `pnpm build`",
36
+ "customInstructions": {
37
+ "autoApprove": {
38
+ "patterns": [
39
+ "*.vue",
40
+ "*.astro",
41
+ "*.ts",
42
+ "*.js",
43
+ "*.mdx",
44
+ "src/**/*",
45
+ "uno-config/**/*"
46
+ ]
47
+ }
48
+ }
49
49
  }
@@ -1,11 +1,11 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- schedule:
11
- interval: "weekly"
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
package/.github/todo.yml CHANGED
@@ -1,3 +1,3 @@
1
- - name: todo-issue
2
- uses: DerJuulsn/todo-issue@v1.1.4
3
-
1
+ - name: todo-issue
2
+ uses: DerJuulsn/todo-issue@v1.1.4
3
+
@@ -1,37 +1,37 @@
1
- name: Claude Code
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- pull_request_review_comment:
7
- types: [created]
8
- issues:
9
- types: [opened, assigned]
10
- pull_request_review:
11
- types: [submitted]
12
-
13
- jobs:
14
- claude:
15
- if: |
16
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
- runs-on: ubuntu-latest
21
- permissions:
22
- contents: write
23
- pull-requests: write
24
- issues: write
25
- id-token: write
26
- actions: read
27
- steps:
28
- - name: Checkout repository
29
- uses: actions/checkout@v6
30
- with:
31
- fetch-depth: 0
32
-
33
- - name: Run Claude Code
34
- id: claude
35
- uses: anthropics/claude-code-action@v1
36
- with:
37
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+ issues: write
25
+ id-token: write
26
+ actions: read
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v6
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -1,72 +1,72 @@
1
- name: Code Quality & Analysis
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- branches: [ main ]
8
-
9
- jobs:
10
- lint-and-format:
11
- name: Lint and Format Check
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v6
17
-
18
- - name: Setup pnpm
19
- uses: pnpm/action-setup@v4
20
- with:
21
- version: 10.32.1
22
-
23
- - name: Setup Node.js
24
- uses: actions/setup-node@v6
25
- with:
26
- node-version: '24'
27
- cache: 'pnpm'
28
-
29
- - name: Install dependencies
30
- run: pnpm install --frozen-lockfile
31
-
32
- - name: Check Prettier formatting
33
- run: pnpm run format:check
34
-
35
- - name: Run ESLint
36
- run: pnpm run lint
37
-
38
- - name: Type check
39
- run: pnpm run check
40
-
41
- sonarcloud:
42
- name: SonarCloud Analysis
43
- runs-on: ubuntu-latest
44
-
45
- steps:
46
- - name: Checkout code
47
- uses: actions/checkout@v6
48
- with:
49
- fetch-depth: 0 # Shallow clones should be disabled for better analysis
50
-
51
- - name: Setup pnpm
52
- uses: pnpm/action-setup@v4
53
- with:
54
- version: 10.32.1
55
-
56
- - name: Setup Node.js
57
- uses: actions/setup-node@v6
58
- with:
59
- node-version: '24'
60
- cache: 'pnpm'
61
-
62
- - name: Install dependencies
63
- run: pnpm install --frozen-lockfile
64
-
65
- - name: Build project
66
- run: pnpm run build
67
-
68
- - name: SonarCloud Scan
69
- uses: SonarSource/sonarcloud-github-action@master
70
- env:
71
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
72
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1
+ name: Code Quality & Analysis
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ lint-and-format:
11
+ name: Lint and Format Check
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v6
17
+
18
+ - name: Setup pnpm
19
+ uses: pnpm/action-setup@v4
20
+ with:
21
+ version: 10.32.1
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v6
25
+ with:
26
+ node-version: '24'
27
+ cache: 'pnpm'
28
+
29
+ - name: Install dependencies
30
+ run: pnpm install --frozen-lockfile
31
+
32
+ - name: Check Prettier formatting
33
+ run: pnpm run format:check
34
+
35
+ - name: Run ESLint
36
+ run: pnpm run lint
37
+
38
+ - name: Type check
39
+ run: pnpm run check
40
+
41
+ sonarcloud:
42
+ name: SonarCloud Analysis
43
+ runs-on: ubuntu-latest
44
+
45
+ steps:
46
+ - name: Checkout code
47
+ uses: actions/checkout@v6
48
+ with:
49
+ fetch-depth: 0 # Shallow clones should be disabled for better analysis
50
+
51
+ - name: Setup pnpm
52
+ uses: pnpm/action-setup@v4
53
+ with:
54
+ version: 10.32.1
55
+
56
+ - name: Setup Node.js
57
+ uses: actions/setup-node@v6
58
+ with:
59
+ node-version: '24'
60
+ cache: 'pnpm'
61
+
62
+ - name: Install dependencies
63
+ run: pnpm install --frozen-lockfile
64
+
65
+ - name: Build project
66
+ run: pnpm run build
67
+
68
+ - name: SonarCloud Scan
69
+ uses: SonarSource/sonarcloud-github-action@master
70
+ env:
71
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
72
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -1,43 +1,43 @@
1
- name: Deploy to GitHub Pages
2
-
3
- on:
4
- # Trigger the workflow every time you push to the `main` branch
5
- # Using a different branch name? Replace `main` with your branch's name
6
- push:
7
- branches: [ main ]
8
- # Allows you to run this workflow manually from the Actions tab on GitHub.
9
- workflow_dispatch:
10
-
11
- # Prevent concurrent deployments
12
- concurrency:
13
- group: pages
14
- cancel-in-progress: false
15
-
16
- # Allow this job to clone the repo and create a page deployment
17
- permissions:
18
- contents: read
19
- pages: write
20
- id-token: write
21
-
22
- jobs:
23
- build:
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Checkout your repository using git
27
- uses: actions/checkout@v6
28
- - name: Install, build, and upload your site
29
- uses: withastro/action@v5
30
- with:
31
- package-manager: pnpm@10.30.3
32
- node-version: 22
33
-
34
- deploy:
35
- needs: build
36
- runs-on: ubuntu-latest
37
- environment:
38
- name: github-pages
39
- url: ${{ steps.deployment.outputs.page_url }}
40
- steps:
41
- - name: Deploy to GitHub Pages
42
- id: deployment
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ # Trigger the workflow every time you push to the `main` branch
5
+ # Using a different branch name? Replace `main` with your branch's name
6
+ push:
7
+ branches: [ main ]
8
+ # Allows you to run this workflow manually from the Actions tab on GitHub.
9
+ workflow_dispatch:
10
+
11
+ # Prevent concurrent deployments
12
+ concurrency:
13
+ group: pages
14
+ cancel-in-progress: false
15
+
16
+ # Allow this job to clone the repo and create a page deployment
17
+ permissions:
18
+ contents: read
19
+ pages: write
20
+ id-token: write
21
+
22
+ jobs:
23
+ build:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout your repository using git
27
+ uses: actions/checkout@v6
28
+ - name: Install, build, and upload your site
29
+ uses: withastro/action@v5
30
+ with:
31
+ package-manager: pnpm@10.30.3
32
+ node-version: 22
33
+
34
+ deploy:
35
+ needs: build
36
+ runs-on: ubuntu-latest
37
+ environment:
38
+ name: github-pages
39
+ url: ${{ steps.deployment.outputs.page_url }}
40
+ steps:
41
+ - name: Deploy to GitHub Pages
42
+ id: deployment
43
43
  uses: actions/deploy-pages@v4
package/.husky/README.md CHANGED
@@ -1,41 +1,41 @@
1
- # Git Hooks with Husky
2
-
3
- This directory contains Git hooks managed by [Husky](https://typicode.github.io/husky/).
4
-
5
- ## Pre-commit Hook
6
-
7
- The pre-commit hook automatically runs before each commit to ensure code quality:
8
-
9
- 1. **Builds the project** (`pnpm run build`)
10
- - Catches MDX syntax errors
11
- - Validates Vue components
12
- - Ensures all documentation examples work
13
-
14
- If the build fails, the commit will be blocked until errors are fixed.
15
-
16
- ## Setup for Team Members
17
-
18
- Hooks are automatically installed when running:
19
-
20
- ```bash
21
- pnpm install
22
- ```
23
-
24
- The `prepare` script in `package.json` handles this automatically.
25
-
26
- ## Benefits
27
-
28
- ✅ Prevents broken builds from being committed
29
- ✅ Catches errors early in development
30
- ✅ Maintains code quality across the team
31
- ✅ Reduces failed CI/CD builds
32
-
33
- ## Bypassing Hooks (Emergency Only)
34
-
35
- If you absolutely need to bypass the pre-commit hook:
36
-
37
- ```bash
38
- git commit --no-verify -m "your message"
39
- ```
40
-
41
- **Note:** Only use this in emergencies. Your commit may break the build.
1
+ # Git Hooks with Husky
2
+
3
+ This directory contains Git hooks managed by [Husky](https://typicode.github.io/husky/).
4
+
5
+ ## Pre-commit Hook
6
+
7
+ The pre-commit hook automatically runs before each commit to ensure code quality:
8
+
9
+ 1. **Builds the project** (`pnpm run build`)
10
+ - Catches MDX syntax errors
11
+ - Validates Vue components
12
+ - Ensures all documentation examples work
13
+
14
+ If the build fails, the commit will be blocked until errors are fixed.
15
+
16
+ ## Setup for Team Members
17
+
18
+ Hooks are automatically installed when running:
19
+
20
+ ```bash
21
+ pnpm install
22
+ ```
23
+
24
+ The `prepare` script in `package.json` handles this automatically.
25
+
26
+ ## Benefits
27
+
28
+ ✅ Prevents broken builds from being committed
29
+ ✅ Catches errors early in development
30
+ ✅ Maintains code quality across the team
31
+ ✅ Reduces failed CI/CD builds
32
+
33
+ ## Bypassing Hooks (Emergency Only)
34
+
35
+ If you absolutely need to bypass the pre-commit hook:
36
+
37
+ ```bash
38
+ git commit --no-verify -m "your message"
39
+ ```
40
+
41
+ **Note:** Only use this in emergencies. Your commit may break the build.
package/.husky/commit-msg CHANGED
@@ -1 +1 @@
1
- pnpm exec commitlint --edit $1
1
+ pnpm exec commitlint --edit $1
package/.husky/pre-commit CHANGED
@@ -1,41 +1,41 @@
1
- echo "🔍 Running pre-commit checks..."
2
-
3
- # Check for merge conflict markers
4
- if ! git diff --cached --check; then
5
- echo "❌ Found merge conflict markers!"
6
- exit 1
7
- fi
8
-
9
- # Check for console.log (optional warning)
10
- if git diff --cached --name-only | xargs grep -n "console\\.log" 2>/dev/null; then
11
- echo "⚠️ Warning: Found console.log statements"
12
- echo " Consider removing them before committing to production"
13
- fi
14
-
15
- # Auto-format code
16
- echo "🎨 Auto-formatting code..."
17
- pnpm run format
18
-
19
- # Re-add formatted files to staging
20
- git add -u
21
-
22
- echo "✅ Code formatted successfully!"
23
-
24
- # Run linting
25
- echo "🔍 Running linter..."
26
- pnpm run lint
27
- if [ $? -ne 0 ]; then
28
- echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
29
- exit 1
30
- fi
31
-
32
- # Run Astro build to catch MDX and component errors
33
- echo "🏗️ Building project..."
34
- pnpm run build
35
-
36
- if [ $? -eq 0 ]; then
37
- echo "✅ All checks passed! Proceeding with commit..."
38
- else
39
- echo "❌ Build failed! Please fix errors before committing."
40
- exit 1
41
- fi
1
+ echo "🔍 Running pre-commit checks..."
2
+
3
+ # Check for merge conflict markers
4
+ if ! git diff --cached --check; then
5
+ echo "❌ Found merge conflict markers!"
6
+ exit 1
7
+ fi
8
+
9
+ # Check for console.log (optional warning)
10
+ if git diff --cached --name-only | xargs grep -n "console\\.log" 2>/dev/null; then
11
+ echo "⚠️ Warning: Found console.log statements"
12
+ echo " Consider removing them before committing to production"
13
+ fi
14
+
15
+ # Auto-format code
16
+ echo "🎨 Auto-formatting code..."
17
+ pnpm run format
18
+
19
+ # Re-add formatted files to staging
20
+ git add -u
21
+
22
+ echo "✅ Code formatted successfully!"
23
+
24
+ # Run linting
25
+ echo "🔍 Running linter..."
26
+ pnpm run lint
27
+ if [ $? -ne 0 ]; then
28
+ echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
29
+ exit 1
30
+ fi
31
+
32
+ # Run Astro build to catch MDX and component errors
33
+ echo "🏗️ Building project..."
34
+ pnpm run build
35
+
36
+ if [ $? -eq 0 ]; then
37
+ echo "✅ All checks passed! Proceeding with commit..."
38
+ else
39
+ echo "❌ Build failed! Please fix errors before committing."
40
+ exit 1
41
+ fi
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 24
1
+ 24
package/.prettierignore CHANGED
@@ -1,15 +1,15 @@
1
- node_modules/
2
- dist/
3
- .astro/
4
- pnpm-lock.yaml
5
- *.md
6
- *.svg
7
- *.png
8
- *.jpg
9
- *.jpeg
10
- *.gif
11
- *.ico
12
- *.woff
13
- *.woff2
14
- *.ttf
1
+ node_modules/
2
+ dist/
3
+ .astro/
4
+ pnpm-lock.yaml
5
+ *.md
6
+ *.svg
7
+ *.png
8
+ *.jpg
9
+ *.jpeg
10
+ *.gif
11
+ *.ico
12
+ *.woff
13
+ *.woff2
14
+ *.ttf
15
15
  *.eot