Repository navigation
feat: add code quality linting and formatting #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5bf9674
docs: add code quality linting and formatting design spec
benhigham d9effc8
docs: add code quality linting and formatting implementation plan
benhigham 806ee9f
chore: add mise config with linting and formatting tools
benhigham ee16472
chore: add prettier config
benhigham 9e27a54
style: format existing files with prettier
benhigham 1d6160c
chore: add yamllint config
benhigham a375405
style: fix yamllint violations in existing files
benhigham 63a4ac8
chore: add markdownlint config
benhigham e369d94
style: fix markdownlint violations in existing files
benhigham 60c9c1f
chore: add lefthook pre-commit hooks for linting and formatting
benhigham c431e16
ci: add lint workflow for PRs and pushes to main
benhigham 2d1ee47
docs: update AGENTS.md with code quality tooling
benhigham ad87a0d
fix(lefthook): use brace expansion globs for root and subdirectory files
benhigham 68d2897
fix: address PR review findings
benhigham 5b3e715
docs: sync spec and plan snippets with actual implementation
benhigham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,118 +1,118 @@ | ||
| version: 2 | ||
|
|
||
| updates: | ||
| - package-ecosystem: 'github-actions' | ||
| directory: '/' | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'github-actions' | ||
| - "dependencies" | ||
| - "github-actions" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - '*' | ||
| - "*" | ||
| update-types: | ||
| - 'minor' | ||
| - 'patch' | ||
| - "minor" | ||
| - "patch" | ||
|
|
||
| - package-ecosystem: 'npm' | ||
| directory: '/' | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'npm' | ||
| - "dependencies" | ||
| - "npm" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
| groups: | ||
| development-dependencies: | ||
| dependency-type: 'development' | ||
| dependency-type: "development" | ||
| update-types: | ||
| - 'minor' | ||
| - 'patch' | ||
| - "minor" | ||
| - "patch" | ||
| production-dependencies: | ||
| dependency-type: 'production' | ||
| dependency-type: "production" | ||
| update-types: | ||
| - 'patch' | ||
| - "patch" | ||
| versioning-strategy: increase | ||
|
|
||
| - package-ecosystem: 'docker' | ||
| directory: '/' | ||
| - package-ecosystem: "docker" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'docker' | ||
| - "dependencies" | ||
| - "docker" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| - package-ecosystem: 'terraform' | ||
| directory: '/' | ||
| - package-ecosystem: "terraform" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'terraform' | ||
| - "dependencies" | ||
| - "terraform" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| - package-ecosystem: 'devcontainers' | ||
| directory: '/' | ||
| - package-ecosystem: "devcontainers" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'devcontainers' | ||
| - "dependencies" | ||
| - "devcontainers" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| - package-ecosystem: 'gitsubmodule' | ||
| directory: '/' | ||
| - package-ecosystem: "gitsubmodule" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'git-submodules' | ||
| - "dependencies" | ||
| - "git-submodules" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| - package-ecosystem: 'gomod' | ||
| directory: '/' | ||
| - package-ecosystem: "gomod" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'weekly' | ||
| interval: "weekly" | ||
| assignees: | ||
| - 'benhigham' | ||
| - "benhigham" | ||
| labels: | ||
| - 'dependencies' | ||
| - 'go' | ||
| - "dependencies" | ||
| - "go" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| include: 'scope' | ||
| prefix: "chore" | ||
| include: "scope" | ||
| groups: | ||
| go-dependencies: | ||
| patterns: | ||
| - '*' | ||
| - "*" | ||
| update-types: | ||
| - 'minor' | ||
| - 'patch' | ||
| - "minor" | ||
| - "patch" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup mise | ||
| uses: jdx/mise-action@v2 | ||
|
|
||
| - name: Check formatting | ||
| run: mise run fmt:check | ||
|
|
||
| - name: Run linters | ||
| run: mise run lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| config: | ||
| MD013: | ||
| line_length: 120 | ||
| MD033: | ||
| allowed_elements: | ||
| - "details" | ||
| - "summary" | ||
|
|
||
| ignores: | ||
| # Legal text — do not reformat | ||
| - "LICENSE.md" | ||
| # PR templates don't need an H1 heading | ||
| - ".github/pull_request_template.md" | ||
| # Planning/spec docs are agentic artifacts with long lines and loose formatting | ||
| - "docs/**/*.md" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| [tools] | ||
| actionlint = "latest" | ||
| lefthook = "latest" | ||
| "npm:markdownlint-cli2" = "latest" | ||
| "npm:prettier" = "latest" | ||
| "pipx:yamllint" = "latest" | ||
|
|
||
| [tasks.lint] | ||
| description = "Run all linters" | ||
| depends = ["lint:actions", "lint:yaml", "lint:markdown"] | ||
|
|
||
| [tasks."lint:actions"] | ||
| description = "Lint GitHub Actions workflows" | ||
| run = "actionlint" | ||
|
|
||
| [tasks."lint:yaml"] | ||
| description = "Lint YAML files" | ||
| run = "yamllint ." | ||
|
|
||
| [tasks."lint:markdown"] | ||
| description = "Lint Markdown files" | ||
| run = "markdownlint-cli2 '**/*.md'" | ||
|
|
||
| [tasks.fmt] | ||
| description = "Format YAML and Markdown files" | ||
| run = "prettier --write '**/*.{yml,yaml,md}'" | ||
|
|
||
| [tasks."fmt:check"] | ||
| description = "Check formatting (no writes)" | ||
| run = "prettier --check '**/*.{yml,yaml,md}'" | ||
|
|
||
| [tasks."fix:markdown"] | ||
| description = "Auto-fix Markdown lint violations" | ||
| run = "markdownlint-cli2 --fix '**/*.md'" | ||
|
|
||
| [tasks.check] | ||
| description = "Run all checks (format + lint)" | ||
| depends = ["fmt:check", "lint"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| LICENSE.md | ||
| CHANGELOG.md | ||
| pnpm-lock.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| proseWrap: preserve |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The markdownlint config ignores
docs/**/*.md, which means the newly added planning/spec docs won’t be linted in CI. This conflicts with the PR description claim that existing lint violations were fixed “across all YAML and Markdown files”; either lint docs as well, or update the PR description/tooling docs to clarify thatdocs/is intentionally excluded from markdownlint.