Skip to content

Add eslint-plugin-yamllint for YAML 1.1 safety#50

Merged
gtbuchanan merged 6 commits intomainfrom
feature/yamlint
Apr 21, 2026
Merged

Add eslint-plugin-yamllint for YAML 1.1 safety#50
gtbuchanan merged 6 commits intomainfrom
feature/yamlint

Conversation

@gtbuchanan
Copy link
Copy Markdown
Owner

Summary

  • Add @gtbuchanan/eslint-plugin-yamllint — native ESLint rules implementing yamllint gap coverage (truthy, octal-values, anchors, document-start, document-end)
  • Enable yml/no-trailing-zeros and yml/require-string-key in existing eslint-plugin-yml config
  • Autofix missing --- document start markers in 9 YAML files
  • Disable document-start rule for pnpm-workspace.yaml (Renovate strips it)

Test plan

  • 37 unit tests across 5 rule test files (RuleTester-based)
  • Full pnpm check passes (24 turbo tasks, typecheck + lint + tests)
  • Existing YAML files pass new rules after autofix

🤖 Generated with Claude Code

gtbuchanan and others added 5 commits April 20, 2026 22:20
Enable yml/no-trailing-zeros and yml/require-string-key
to catch subtle YAML value bugs that eslint-plugin-yml
supports but the recommended preset does not enable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements yamllint-equivalent rules as native ESLint rules
using the yaml npm package — no Python dependency required.

Rules: truthy (auto-fixable), octal-values, anchors,
document-start (auto-fixable), document-end (auto-fixable).

Integrates into eslint-config alongside eslint-plugin-yml.
Disables document-start for pnpm-workspace.yaml (Renovate
strips the header). Autofixes missing --- markers in existing
YAML files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add @gtbuchanan/eslint-plugin-yamllint to the e2e fixture's
workspaceDeps so the tarball is installed alongside
eslint-config during isolated testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add eslint-plugin-yamllint to workspaceDeps and update YAML
test to include --- document start marker expected by the
new yamllint/document-start rule.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify truthy and octal-values rules fire through the full
eslint-config pipeline on YAML files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add README with yamllint rule comparison table showing what
each tool covers and why only 5 rules are implemented here.
Update AGENTS.md structure and linter sections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gtbuchanan gtbuchanan merged commit 2073bb5 into main Apr 21, 2026
7 of 8 checks passed
@gtbuchanan gtbuchanan deleted the feature/yamlint branch April 21, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant