Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/generate-coverage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 🧪 Generate coverage
description: Generate a kcov coverage report in Docker
inputs:
kcov-image:
description: Pinned kcov Docker image
required: false
default: kcov/kcov@sha256:481289ae32e55e5b733019515acd10948a4f76dfed381765577db909664fc603
runs:
using: composite
steps:
- name: 🧪 Generate coverage
shell: bash
env:
KCOV_IMAGE: ${{ inputs.kcov-image }}
run: |
docker run --rm \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--volume "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" \
--workdir "$GITHUB_WORKSPACE" \
--user "$(id -u):$(id -g)" \
--entrypoint /bin/sh \
"$KCOV_IMAGE" \
"$GITHUB_WORKSPACE/scripts/coverage.sh"
2 changes: 1 addition & 1 deletion .github/actions/report-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
thresholds: '70 80'

- name: 💬 Add coverage PR comment
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _None_

## ✅ Checklist before requesting a review

- [ ] I have performed a self-review of my code
- [ ] If it is a core feature, I have added thorough tests
- [ ] I have checked that affected pages are responsive
- [ ] I have checked that there are no z-index issues on affected pages
- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] I have run `yarn validate` when required.
- [ ] If CLI behavior changed, I have smoke-tested the affected commands.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: 🗜️ Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

- name: 🗜️ Setup Zig
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: actions/setup-node@v6
with:
node-version: 24
node-version-file: .nvmrc
registry-url: https://npm.pkg.github.com
scope: '@celtian'

Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ permissions:
contents: read
pull-requests: write

env:
# kcov/kcov:latest, pinned for reproducible builds
KCOV_IMAGE: kcov/kcov@sha256:481289ae32e55e5b733019515acd10948a4f76dfed381765577db909664fc603

jobs:
test:
name: 🛠️ Validate & Package
Expand All @@ -21,7 +17,7 @@ jobs:
- name: 🗜️ Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

- name: 🗜️ Setup Zig
Expand All @@ -42,16 +38,7 @@ jobs:
run: yarn coverage:build

- name: 🧪 Generate coverage
run: |
docker run --rm \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--volume "$PWD:$PWD" \
--workdir "$PWD" \
--user "$(id -u):$(id -g)" \
--entrypoint /bin/sh \
"$KCOV_IMAGE" \
"$PWD/scripts/coverage.sh"
uses: ./.github/actions/generate-coverage

- name: 📊 Report coverage
if: github.event.pull_request.head.repo.full_name == github.repository
Expand Down Expand Up @@ -91,7 +78,7 @@ jobs:
- name: 🗜️ Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
node-version-file: .nvmrc

- name: 🗜️ Setup Zig
uses: mlugg/setup-zig@v2
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,66 @@

## 🚀 Install

With npm:

```bash
npm install quick-commitlint --save-dev
```

With Yarn:

```bash
yarn add quick-commitlint --dev
```

With pnpm:

```bash
pnpm add -D quick-commitlint
```

With Bun:

```bash
bun add quick-commitlint --dev
```

The package includes native executables for macOS arm64/x64, Linux arm64/x64, and Windows x64. The launcher requires Node.js 24 or 25.

## 🪝 Use in a commit hook

Pass the commit-message file as the only positional argument:

```sh
quick-commitlint "$1"
```

### Husky 9

Install and initialize Husky with npm:

```bash
npm install husky --save-dev
npx husky init
```

Or with Yarn:

```bash
yarn add husky --dev
yarn exec husky init
```

`husky init` configures Git hooks and creates an example `.husky/pre-commit` hook. Customize or remove that example hook if you do not need it.

Then create `.husky/commit-msg`:

```sh
quick-commitlint "$1"
```

Husky adds local `node_modules/.bin` commands to the hook's `PATH`, so this runs the installed Quick Commitlint development dependency. Git supplies the proposed commit-message file as `$1`.

Or lint a message from standard input:

```bash
Expand Down
Binary file modified docs/assets/terminal-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@
},
"devDependencies": {
"@angular-eslint/builder": "22.1.0",
"@angular/build": "^22.0.4",
"@angular/cdk": "^22.0.5",
"@angular/cli": "^22.0.4",
"@angular/common": "^22.0.0",
"@angular/compiler": "^22.0.0",
"@angular/compiler-cli": "^22.0.0",
"@angular/core": "^22.0.0",
"@angular/forms": "^22.0.0",
"@angular/material": "^22.0.5",
"@angular/platform-browser": "^22.0.0",
"@angular/platform-server": "^22.0.0",
"@angular/router": "^22.0.0",
"@angular/ssr": "^22.0.4",
"@angular/build": "^22.0.8",
"@angular/cdk": "^22.0.6",
"@angular/cli": "^22.0.8",
"@angular/common": "^22.0.8",
"@angular/compiler": "^22.0.8",
"@angular/compiler-cli": "^22.0.8",
"@angular/core": "^22.0.8",
"@angular/forms": "^22.0.8",
"@angular/material": "^22.0.6",
"@angular/platform-browser": "^22.0.8",
"@angular/platform-server": "^22.0.8",
"@angular/router": "^22.0.8",
"@angular/ssr": "^22.0.8",
"@commitlint/cli": "21.2.1",
"@commitlint/config-angular": "21.2.0",
"@commitlint/config-conventional": "21.2.0",
Expand All @@ -71,24 +71,24 @@
"@types/node": "^24",
"angular-eslint": "22.1.0",
"auto-changelog": "^2.6.0",
"axe-core": "^4.10.3",
"eslint": "^10.6.0",
"fs-extra": "^11.3.6",
"axe-core": "^4.12.1",
"eslint": "^10.8.0",
"fs-extra": "^11.4.0",
"husky": "^9.1.7",
"jsdom": "^28.0.0",
"marked": "^18.0.6",
"jsdom": "^29.1.1",
"marked": "^18.0.7",
"ngx-markdown": "^22.0.0",
"ngx-scrolltop": "^22.0.0",
"postcss": "^8.5.3",
"prettier": "^3.8.1",
"postcss": "^8.5.23",
"prettier": "^3.9.6",
"rimraf": "^6.1.3",
"rxjs": "~7.8.0",
"rxjs": "^7.8.2",
"tailwindcss": "^4.3.3",
"tslib": "^2.3.0",
"tslib": "^2.8.1",
"tsx": "^4.23.1",
"typescript": "~6.0.2",
"typescript-eslint": "8.62.1",
"vitest": "^4.0.8"
"typescript-eslint": "^8.65.0",
"vitest": "^4.1.10"
},
"bin": {
"quick-commitlint": "zig-out/bin/quick-commitlint"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
}

button {
align-items: center;
display: inline-flex;
min-width: auto;
}

button > span:first-child {
.theme-icon {
align-items: center;
display: inline-flex;
font-size: 1.25rem;
line-height: 1;
margin-inline-end: 0.4rem;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[matMenuTriggerFor]="themeMenu"
[attr.aria-description]="'Current theme: ' + currentLabel()"
>
<span aria-hidden="true">◐</span>
<span class="theme-icon" aria-hidden="true">◐</span>
<span class="theme-label">{{ currentLabel() }}</span>
</button>

Expand Down
12 changes: 12 additions & 0 deletions projects/portal/src/app/docs/content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ With Yarn:
yarn add quick-commitlint --dev
```

With pnpm:

```bash
pnpm add -D quick-commitlint
```

With Bun:

```bash
bun add quick-commitlint --dev
```

## Lint your first message

Pipe a Conventional Commit message to the command:
Expand Down
22 changes: 21 additions & 1 deletion projects/portal/src/app/docs/content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,32 @@ Git calls `commit-msg` with the path to the proposed message. A minimal hook is:
quick-commitlint "$1"
```

With Husky, put the command in `.husky/commit-msg`:
### Husky 9

Install and initialize Husky with npm:

```bash
npm install husky --save-dev
npx husky init
```

Or with Yarn:

```bash
yarn add husky --dev
yarn exec husky init
```

`husky init` configures Git hooks and creates an example `.husky/pre-commit` hook. Customize or remove that example hook if you do not need it.

Then create `.husky/commit-msg`:

```sh
quick-commitlint "$1"
```

Husky adds local `node_modules/.bin` commands to the hook's `PATH`, so this runs the installed Quick Commitlint development dependency. Git supplies the proposed commit-message file as `$1`.

Make sure the hook file is executable when it is managed directly by Git.

## Introduce a rule gradually
Expand Down
30 changes: 22 additions & 8 deletions projects/portal/src/app/pages/docs-layout/docs-layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,38 @@ mat-sidenav-container {
}

mat-sidenav {
--mat-sidenav-container-shape: 0;

background: var(--mat-sys-surface-container-low);
border-right: 1px solid var(--mat-sys-outline-variant);
padding: 1rem 0.75rem;
width: 17.5rem;
}

nav {
display: grid;
padding: 1rem 0.75rem;
}

.nav-group {
min-width: 0;
}

.nav-group + .nav-group {
border-block-start: 1px solid var(--mat-sys-outline-variant);
margin-block-start: 1.25rem;
padding-block-start: 1.25rem;
}

.nav-heading {
color: var(--mat-sys-on-surface-variant);
font: var(--mat-sys-label-large);
letter-spacing: 0.06em;
margin: 1.25rem 1rem 0.25rem;
font: var(--mat-sys-title-large);
font-size: 1.25rem;
font-weight: var(--mat-sys-label-large-weight-prominent);
letter-spacing: 0.04em;
margin: 0 1rem 0.5rem;
text-transform: uppercase;
}

.nav-heading:first-child {
margin-block-start: 0.5rem;
}

.mobile-docs-bar {
background: var(--mat-sys-surface);
border-bottom: 1px solid var(--mat-sys-outline-variant);
Expand Down
Loading
Loading