spoko-design-system 1.20.0 → 1.21.1

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 (92) 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 +43 -43
  7. package/.husky/README.md +41 -41
  8. package/.husky/commit-msg +1 -1
  9. package/.husky/pre-commit +40 -40
  10. package/.prettierignore +14 -14
  11. package/.prettierrc +30 -30
  12. package/.stackblitzrc +5 -5
  13. package/.vscode/extensions.json +4 -4
  14. package/.vscode/launch.json +11 -11
  15. package/.vscode/settings.json +21 -21
  16. package/CHANGELOG.md +476 -462
  17. package/CLAUDE.md +268 -268
  18. package/LICENSE +21 -21
  19. package/README.md +303 -303
  20. package/TOOLTIPS.md +236 -236
  21. package/astro.config.mjs +84 -84
  22. package/commitlint.config.js +3 -3
  23. package/dev-dist/sw.js +91 -91
  24. package/dev-dist/workbox-c676b6d3.js +3391 -3391
  25. package/eslint.config.js +70 -70
  26. package/icon.config.ts +348 -348
  27. package/index.ts +78 -78
  28. package/package.json +160 -160
  29. package/public/arrow-bottom.svg +7 -7
  30. package/public/fonts/lg.svg +53 -53
  31. package/public/fonts/vwhead-bold-demo.html +549 -549
  32. package/public/fonts/vwhead-regular-demo.html +549 -549
  33. package/public/fonts/vwtext-bold-demo.html +549 -549
  34. package/public/fonts/vwtext-regular-demo.html +549 -549
  35. package/public/github.svg +3 -3
  36. package/public/grid_dot.svg +4 -4
  37. package/public/linkedin.svg +44 -44
  38. package/public/make-scrollable-code-focusable.js +3 -3
  39. package/public/pagefind.yml +3 -3
  40. package/public/polo.blue.svg +29 -29
  41. package/public/spoko.space.svg +71 -71
  42. package/public/twitter.svg +46 -46
  43. package/renovate.json +6 -6
  44. package/sandbox.config.json +11 -11
  45. package/sonar-project.properties +26 -26
  46. package/src/components/Category/CategoriesCarousel.astro +3 -7
  47. package/src/pages/components/badges.mdx +57 -57
  48. package/src/pages/components/breadcrumbs.mdx +139 -139
  49. package/src/pages/components/buttons.mdx +359 -359
  50. package/src/pages/components/card.mdx +294 -294
  51. package/src/pages/components/carousel.mdx +62 -62
  52. package/src/pages/components/copyright.mdx +42 -42
  53. package/src/pages/components/details-list.mdx +207 -207
  54. package/src/pages/components/features-list.mdx +37 -37
  55. package/src/pages/components/flags.mdx +49 -49
  56. package/src/pages/components/fuck-russia.mdx +39 -39
  57. package/src/pages/components/hand-drive.mdx +78 -78
  58. package/src/pages/components/headline.mdx +337 -337
  59. package/src/pages/components/image.mdx +513 -513
  60. package/src/pages/components/input.mdx +367 -367
  61. package/src/pages/components/jumbotron.mdx +530 -530
  62. package/src/pages/components/modal.mdx +212 -212
  63. package/src/pages/components/post-header.mdx +64 -64
  64. package/src/pages/components/pr-code.mdx +213 -213
  65. package/src/pages/components/product-engine.mdx +418 -418
  66. package/src/pages/components/product-number.mdx +58 -58
  67. package/src/pages/components/product-tile.mdx +51 -51
  68. package/src/pages/components/quote.mdx +33 -33
  69. package/src/pages/components/slimbanner.mdx +260 -260
  70. package/src/pages/components/table.mdx +108 -108
  71. package/src/pages/core/colors.mdx +21 -21
  72. package/src/pages/core/grid.mdx +193 -193
  73. package/src/pages/core/introduction.mdx +77 -77
  74. package/src/pages/core/tooltips.mdx +491 -491
  75. package/src/pages/patterns/introduction.mdx +60 -60
  76. package/src/styles/_variables.scss +70 -70
  77. package/tailwind.config.cjs +8 -8
  78. package/tsconfig.json +28 -28
  79. package/uno-config/index.ts +269 -269
  80. package/uno-config/theme/breakpoints.ts +9 -9
  81. package/uno-config/theme/colors.ts +65 -65
  82. package/uno-config/theme/dimensions.ts +17 -17
  83. package/uno-config/theme/effects.ts +14 -14
  84. package/uno-config/theme/grid.ts +10 -10
  85. package/uno-config/theme/index.ts +26 -26
  86. package/uno-config/theme/shortcuts/buttons.ts +53 -53
  87. package/uno-config/theme/shortcuts/components.ts +124 -124
  88. package/uno-config/theme/shortcuts/index.ts +20 -20
  89. package/uno-config/theme/shortcuts/jumbotron.ts +71 -71
  90. package/uno-config/theme/shortcuts/layout.ts +75 -75
  91. package/uno-config/theme/typography.ts +29 -29
  92. 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@v4
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@v4
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@v5
17
-
18
- - name: Setup pnpm
19
- uses: pnpm/action-setup@v4
20
- with:
21
- version: 10.17.1
22
-
23
- - name: Setup Node.js
24
- uses: actions/setup-node@v5
25
- with:
26
- node-version: '22'
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@v5
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.17.1
55
-
56
- - name: Setup Node.js
57
- uses: actions/setup-node@v5
58
- with:
59
- node-version: '22'
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@v5
17
+
18
+ - name: Setup pnpm
19
+ uses: pnpm/action-setup@v4
20
+ with:
21
+ version: 10.17.1
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v5
25
+ with:
26
+ node-version: '22'
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@v5
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.17.1
55
+
56
+ - name: Setup Node.js
57
+ uses: actions/setup-node@v5
58
+ with:
59
+ node-version: '22'
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,44 +1,44 @@
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@v5
28
- - name: Install, build, and upload your site
29
- uses: withastro/action@v4
30
- with:
31
- package-manager: pnpm@10.17.1
32
- # path: . # The root location of your Astro project inside the repository. (optional)
33
- # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
34
-
35
- deploy:
36
- needs: build
37
- runs-on: ubuntu-latest
38
- environment:
39
- name: github-pages
40
- url: ${{ steps.deployment.outputs.page_url }}
41
- steps:
42
- - name: Deploy to GitHub Pages
43
- 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@v5
28
+ - name: Install, build, and upload your site
29
+ uses: withastro/action@v4
30
+ with:
31
+ package-manager: pnpm@10.17.1
32
+ # path: . # The root location of your Astro project inside the repository. (optional)
33
+ # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
34
+
35
+ deploy:
36
+ needs: build
37
+ runs-on: ubuntu-latest
38
+ environment:
39
+ name: github-pages
40
+ url: ${{ steps.deployment.outputs.page_url }}
41
+ steps:
42
+ - name: Deploy to GitHub Pages
43
+ id: deployment
44
44
  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,40 +1,40 @@
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
- # Run format check
16
- echo "🎨 Checking code formatting..."
17
- pnpm run format:check
18
- if [ $? -ne 0 ]; then
19
- echo "❌ Format check failed! Run 'pnpm run format' to fix."
20
- exit 1
21
- fi
22
-
23
- # Run linting
24
- echo "🔍 Running linter..."
25
- pnpm run lint
26
- if [ $? -ne 0 ]; then
27
- echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
28
- exit 1
29
- fi
30
-
31
- # Run Astro build to catch MDX and component errors
32
- echo "🏗️ Building project..."
33
- pnpm run build
34
-
35
- if [ $? -eq 0 ]; then
36
- echo "✅ All checks passed! Proceeding with commit..."
37
- else
38
- echo "❌ Build failed! Please fix errors before committing."
39
- exit 1
40
- 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
+ # Run format check
16
+ echo "🎨 Checking code formatting..."
17
+ pnpm run format:check
18
+ if [ $? -ne 0 ]; then
19
+ echo "❌ Format check failed! Run 'pnpm run format' to fix."
20
+ exit 1
21
+ fi
22
+
23
+ # Run linting
24
+ echo "🔍 Running linter..."
25
+ pnpm run lint
26
+ if [ $? -ne 0 ]; then
27
+ echo "❌ Lint check failed! Run 'pnpm run lint:fix' to fix."
28
+ exit 1
29
+ fi
30
+
31
+ # Run Astro build to catch MDX and component errors
32
+ echo "🏗️ Building project..."
33
+ pnpm run build
34
+
35
+ if [ $? -eq 0 ]; then
36
+ echo "✅ All checks passed! Proceeding with commit..."
37
+ else
38
+ echo "❌ Build failed! Please fix errors before committing."
39
+ exit 1
40
+ fi
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