← Back to issue list

chore: migrate from yamllint to prettier

View original Github issue

Metadata

Project
charmcraft
Number
#2265
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 0e124cfd: pre-commit yamllint hook dropped and Prettier (3.6.0) added for yaml/yml/json/md formatting, ported from starbase; 22 files re-formatted.

Resolution: closed resolved

Reason: The PR was approved and merged into main as commit 0e124cfd, and the resulting .pre-commit-config.yaml now lists mirrors-prettier (yaml|yml|json|json5|css|md) instead of adrienverge/yamllint. The change was ported from canonical/starbase#305, which closed starbase#273, and the analogous rockcraft change landed in rockcraft#794.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Changes from starbase

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 0e124cfd: pre-commit yamllint hook dropped and Prettier (3.6.0) added for yaml/yml/json/md formatting, ported from starbase; 22 files re-formatted.
stealth/space-bunny-alpha — closed resolved Merged as commit 0e124cfd: yamllint was dropped and Prettier adopted for YAML/JSON/MD formatting in pre-commit, Makefile/common.mk targets, and 22 reformatted files (starbase changes backported).
stealth/space-bunny-alpha — closed resolved Merged as commit 0e124cfd. Ported starbase's yamllint→Prettier switch into charmcraft, replacing the yamllint config with Prettier formatting for YAML/JSON/Markdown (22 files, +107/-110).
stealth/space-bunny-alpha — closed resolved Merged as commit 0e124cfd, replacing yamllint with Prettier for YAML formatting across 22 files.
stealth/space-bunny-alpha — closed resolved Merged PR #2265 as commit 0e124cfd, replacing yamllint with Prettier for YAML formatting across 22 files.
qwen/qwen3.6-35b-a3b — — Merged after approval by two reviewers. Migrated YAML linting from yamllint to prettier across 22 files, standardizing formatting and reducing configuration overhead. Core CI checks passed.
qwen3.6-35b-a3b-mtp-q6 — — Merged changes migrating YAML linting from yamllint to prettier, adopting upstream configuration from the starbase project.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/starbase#305 (confidence 92%)

    Upstream PR the change was ported from; added Prettier in place of yamllint in pre-commit.

  • Related To: canonical/starbase#273 (confidence 88%)

    Original starbase issue requesting yamllint be replaced with prettier, closed by starbase#305.

  • Related To: canonical/rockcraft#794 (confidence 80%)

    Same yamllint-to-prettier migration applied in the sibling rockcraft project (issue rockcraft#791).

  • Related To: canonical/charmcraft#411 (confidence 60%)

    Follow-up 'style: autoformat with newest prettier' normalising files after the Prettier switch.

Related issues

Issue Project State Summary Similarity
#305 style: replace yamllint with prettier starbase merged Merged PR canonical/starbase#305 (commit 68d8d79, CRAFT-3626) swapped yamllint for Prettier in pre-commit and common.mk, covering YAML, JSON, JSON5, CSS and Markdown; TOML excluded pending prettier/prettier#15141. Closes #273.
82%
#794 style: replace yamllint with prettier rockcraft merged Merged #794, replacing yamllint with Prettier and reformatting 95 files; it fixed #791. The change was ported from starbase#305 and generated with make format-prettier.
82%
#362 chore: remove unused yamllint dependency starbase merged Merged #362 in commit 8e2c469, removing the unused yamllint dependency from three files after YAML linting had moved to Prettier.
81%
#273 Replace `yamllint` with `prettier` starbase closed Resolved by merged PR #305 (commit 68d8d79), replacing yamllint with Prettier for YAML, JSON/JSON5, Markdown and CSS; TOML was excluded due to prettier/prettier#15141.
80%
#791 Lint yaml files with prettier rockcraft closed Replaced yamllint with Prettier for YAML linting and formatting through merged PR canonical/rockcraft#794.
77%
#122 build(deps): update pre-commit hook adrienverge/yamllint to v1.37.0 craft-platforms merged Renovate PR #122 (merged as commit edef409) bumped the adrienverge/yamllint pre-commit hook from v1.35.1 to v1.37.0 in .pre-commit-config.yaml; yamllint was later removed entirely in #144.
74%
#244 build(deps): update pre-commit hook adrienverge/yamllint to v1.35.1 starbase merged Renovate bumped the yamllint pre-commit hook from v1.33.0 to v1.35.1; merged via commit 96d6635 (approved, +1/-1 in .pre-commit-config.yaml). Later yamllint was dropped entirely in #362.
73%
#178 chore(deps): update dependency yamllint to v1.33.0 starbase merged Renovate bumped yamllint 1.31.0 -> 1.33.0; PR #178 merged to main in commit 0cfc30a, a one-line change to the yamllint pin in .pre-commit-config.yaml.
72%
#312 build(deps): update pre-commit hook adrienverge/yamllint to v1.37.1 (main) craft-store merged Renovate PR #312 bumping the adrienverge/yamllint pre-commit hook from v1.35.1 to v1.37.1 was merged into main (commit 7e5f289), a one-line .pre-commit-config.yaml bump; all CI checks passed.
72%
#5489 chore: remove unused yamllint config snapcraft merged Merged PR #5489 (commit 6bc01220e), deleting the now-unused 29-line yamllint configuration.
72%