본문으로 건너뛰기
cccskills
무료GitHub에 공개

migrate4-5

Guides you through migrating markuplint configuration from v4 to v5. Detects current versions, reviews the migration guide, interactively confirms breaking changes and new rules with the user, updates config files and tests. For Claude Code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint스타 630(GitHub 630 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md11.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

migrate4-5

Guides you through migrating markuplint from stable v4 (last release v4.18.3) to v5. Treat v5 alpha/rc rule names as if they never existed.

Install: npx skills add markuplint/markuplint@migrations/v4-v5

When to Use

Use this skill when the user requests any of the following:

  • "Upgrade markuplint to v5"
  • "Migrate markuplint from v4 to v5"
  • "Update markuplint version"
  • "markuplint migration"

Steps

1. Detect Current Versions

  • Detect the current versions of markuplint-related packages (markuplint, @markuplint/*) from package.json and list them
  • Locate configuration files (.markuplintrc, .markuplintrc.json, markuplint.config.js, etc.)
  • Confirm Node.js is v24.0.0 or later (v4 documented v18.18.0). Stop and have the user upgrade Node before changing packages.

2. Review the Migration Guide

Documentation base URL: check the target v5 version with npx markuplint --version. If it contains alpha, beta, or rc, use https://next.markuplint.dev; otherwise use https://markuplint.dev.

  • Website guide (users): {base}/docs/migration/v4-to-v5/

Required pages: {base}/docs/migration/v4-to-v5/ (index), {base}/docs/migration/v4-to-v5/rules/rule-names (renames and splits), {base}/docs/migration/v4-to-v5/aria, {base}/docs/migration/v4-to-v5/cli, {base}/docs/migration/v4-to-v5/config

Also fetch when the config uses the feature:

TopicWebsite path
Framework parsers{base}/docs/migration/v4-to-v5/framework
invalid-attr split{base}/docs/migration/v4-to-v5/rules/invalid-attr
required-element{base}/docs/migration/v4-to-v5/rules/required-element
deprecated-element{base}/docs/migration/v4-to-v5/rules/deprecated-element
Table model{base}/docs/migration/v4-to-v5/rules/table-row-column-alignment
Parse errors (opt-in){base}/docs/migration/v4-to-v5/rules/parse-error
textlint removal{base}/docs/migration/v4-to-v5/rules/textlint

Inspect node_modules presets and rule-aliases only to confirm what the installed v5 actually expands — do not invent names from memory.

Do not migrate using wai-aria-* intermediate names, no-unsupported-features, script-content, srcset-sizes-constraint, or input-button-non-empty-value. Those were not stable v4 rule names.

3. Confirm with the User (use AskUserQuestion extensively)

Always use AskUserQuestion at each decision. Never decide for the user. Batch up to 4 related questions.

Phase 1: Silent gaps and CI (must ask)

These do not produce a deprecation warning:

  1. Raw (non-preset) permitted-contents → add no-disallowed-ancestor, require-ancestor, no-duplicate-sibling-attr to keep v4 coverage?
  2. Raw no-refer-to-non-existent-id → add no-broken-fragment-link? (markuplint:html-standard alone still lacks this sibling; a11y / recommended include it.)
  3. Raw label-has-control → add label-no-multiple-controls? (markuplint:a11y alone does not enable the sibling; html-standard / recommended do.) v5 label-has-control only reports a label with no associated control.
  4. Table-model rules no-table-cell-overlap, no-table-span-overflow, no-empty-table-track escalate warning → error. Keep errors, or set "severity": "warning" to mimic v4?
  5. v4 CI treated warnings as failures? Add --no-allow-warnings (v5 allows warnings by default).
  6. ARIA default is 1.3. Keep 1.3, or set ruleCommonSettings.ariaVersion to "1.2"?
  7. wai-aria: true / markuplint:a11y now also run checks that were off or absent in v4 wai-aria defaults: no-aria-on-presentational-children, no-focusable-in-aria-hidden, no-default-aria-value, require-parent-role, tab-requires-tabpanel. Keep them, or disable individually?

Phase 2: Preset extras on markuplint:recommended

v4 recommended did not include these; v5 does. Confirm whether to keep or disable:

  • markuplint:compat: no-unsupported-browser-features, no-nonstandard-features (needs browserslist for the former; no-experimental-features stays opt-in)
  • markuplint:code-styles: case-sensitive-attr-name, case-sensitive-tag-name
  • markuplint:security: no-event-handler-attr
  • markuplint:html-standard now enables no-unknown-attr / no-disallowed-attr / no-invalid-attr-value (v4 html-standard did not include invalid-attr) and drops no-duplicate-dt / no-ineffective-attr

Phase 3: Other breaking changes that apply

Ask only if the config uses the feature:

  • --config no longer merges with auto-discovered config
  • extends: array rule values replace; nested options are shallow-merged
  • required-element → require-element; ghost elements no longer satisfy requirements (ignoreOmittedElements default true)
  • invalid-attr { type: X } wrapper removed; route options per the guide
  • htmx: @markuplint/htmx-parser → @markuplint/htmx-spec (drop parser entry)
  • Alpine: keep parser; spec @markuplint/alpine-parser/spec → @markuplint/alpine-spec
  • @markuplint/rule-textlint removed
  • pretenders on standard HTML/SVG tags are ignored
  • :closest() → :is(… *) (removed in v6)
  • Non-fatal HTML parse errors: opt in via severity.parseError (see rules/parse-error.md). Off by default.

Phase 4: New rules not in any preset

Present opt-in rules (attr-order, class-naming, … — list from rule-names "no preset" set). For attr-order, the user must supply the exact order array; true is not enough.

4. Update Dependency Versions

  • Bump markuplint and every @markuplint/* to the same v5 version
  • Uninstall @markuplint/htmx-parser / @markuplint/rule-textlint if present
  • Install @markuplint/htmx-spec / @markuplint/alpine-spec when those frameworks are in use

5. Update Configuration Files

  • Rewrite deprecated rule names from Markuplint's deprecation warnings after one run (old names work until v6; still rewrite now)
  • Apply the silent-gap siblings the user confirmed
  • Set ruleCommonSettings.ariaVersion if they chose 1.2
  • Disable extra ARIA/preset rules they declined
  • Convert invalid-attr / required-element / framework parser/specs as agreed
  • Named preset groups (a11y/html-lang, a11y/wai-aria/*, …) can be toggled in rules without renaming the user's own nodeRules unless they want names

6. Triage newly flagged markup

Everything above is about config. Separately, v5 tightened a number of built-in checks so that markup which passed under v4 now fails with no config change involved — see Reference: newly flagged markup. Run markuplint once (after step 5) and treat any violation from that list as an expected v5 finding, not a false positive:

  • Fix the markup, or
  • If a specific case is load-bearing for this project, add a targeted nodeRules disable/severity override and note why

Do not silence these by disabling the rule outright — they are spec-conformance checks, not new opt-in preferences.

7. Update Tests

  • Run markuplint; include ruleId and Named Rule Group name in assertions when present
  • --config / -c in tests loads only that file
  • Attribute-order and column numbers may shift if attr-order is adopted

8. Commit

Split by change type in the user's repo (example):

  1. feat!: upgrade markuplint to v5 — package.json + lockfile
  2. fix: migrate markuplint config for v5 — config
  3. test: update fixtures for markuplint v5

Reference: must-check (no warning)

SituationAdd or change
Raw permitted-contentsno-disallowed-ancestor, require-ancestor, no-duplicate-sibling-attr
Raw no-refer-to-non-existent-idno-broken-fragment-link
Raw label-has-controllabel-no-multiple-controls
Table modelthree rules now error
CI on warnings--no-allow-warnings

Old renamed/split names still work with a deprecation warning until v6. Option-routed splits (stable v4): doctype, landmark-roles, required-h1, invalid-attr — do not blindly enable every sibling.

Reference: newly flagged markup (no config change)

Full detail with cited spec sections and examples: invalid-attr migration page (see also its "Additional patterns" section) and the markup-level-checks note near the top of the index page (fetch via {base} for the prerelease-vs-stable host, per step 2). Summary, grouped by enforcing rule:

RuleWhat now fails
no-invalid-attr-value, no-disallowed-attr, require-attr (the invalid-attr split)URL Living Standard strictness on every URL-typed attribute; empty URLs on src/action/poster/etc.; lang/hreflang validated against the IANA subtag registry; deprecated media= types/features and malformed media conditions; script attribute applicability (e.g. defer on type=module); meta[charset] must be literal utf-8; CSP3 grammar on meta[http-equiv=content-security-policy]; bdo[dir] excludes auto and is required; usemap="#"; itemid/itemtype require itemscope; input min/max per-type format; source[sizes] requires srcset
no-prohibited-namingAutonomous custom elements (<x-y>, no is=) without an explicit role can't carry aria-label/aria-labelledby/aria-braillelabel
element-supports-aria-propElements with properties: false (e.g. input[type=hidden]) reject all aria-*; aria-expanded disallowed on button[popovertarget] and summary in details
permitted-contentsMathML elements enforce exact child counts (e.g. mfrac needs exactly two); nested SVG <a> rejected; <div> in <dl> allows only one dt+/dd+ group

Also: nodeRules selectors now match HTML attribute names case-insensitively ([charset] matches <meta CHARSET>) — not a new violation, but can change which elements the user's own nodeRules target. See Config.

wai-aria expands to 21 rules; toggles are not mapped. See the ARIA guide for the v4 option table.

Reference: Named Rule Groups

Preset entries with a name (for example a11y/html-lang) can be disabled or given a different severity from rules:

rules: {
  'a11y/html-lang': false,
  'a11y/*': false,
}

Adding name to the user's own nodeRules is optional, not required for v4→v5.

Reference: -c / --config

v5 loads only the file passed to --config. It does not merge .markuplintrc. Tests that used v4 merge behavior must extends the project config or pass a complete file.

Reference: browserslist rules

no-unsupported-browser-features (in markuplint:compat, hence recommended) is a no-op without browserslist. no-experimental-features is not in the compat preset (opt-in). no-nonstandard-features is in compat.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Maintenance of the nu-validator coverage benchmark: defend the invariants (nu-only = 0, xref audit green), follow up a nu-validator upstream update (submodule bump / Docker image drift), and regression-check after markuplint rule or spec changes. Use when updating the validator submodule, when a bench refresh surfaces new nu-only entries, when excluded-ids entries go stale, or for the periodic health check. Trigger keywords: bench maintain, bench maintenance, nu update, submodule bump, validator update, bench refresh, nu-only regression, stale excluded-ids, image digest.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

Enable an existing or newly-added markuplint rule on the nu-validator bench by editing tests/external/bench/config.ts. Covers the flat-rule case (rules: { '<name>': true }) and the severity override case (rules: { '<name>': { severity: 'error' } }) that bench-virtual-rule does not. Use when a rule exists in the registry but the relevant nu fixtures stay nu-only because the rule is not enabled in the bench config, or when a rule's default severity is warning but the spec text it mirrors is a MUST / MUST NOT. Trigger keywords: enable bench rule, bench config flat rule, severity override bench, rule not flagging on bench, warning vs error in bench, escalate severity bench, no-contradictory-aria-prop bench, bench coverage missing rule.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

Set up the nu-validator benchmark environment — initialise the validator submodule, ensure Docker is running, populate the gitignored raw snapshots via yarn bench:update. Also covers Docker / nu-runner troubleshooting. Use when bench commands fail with "no snapshots found", "Docker daemon not reachable", port 28888 conflicts, or healthcheck timeouts; or when refreshing the bench after a long break. Trigger keywords: bench setup, bench Docker, validator submodule, no snapshots found, Docker daemon not reachable, healthcheck times out, port 28888, yarn bench:update first time, bench install, fresh clone bench.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

Triage one nu-only fixture from tests/external/snapshots/diff/nu-only.json by reading the spec, then drive its verdict to match-error, match-clean, or nu-over by either fixing markuplint or recording an excluded-ids.json entry. The core per-fixture operation of the nu-validator coverage benchmark. Use when a bench refresh surfaces new nu-only entries, when checking a coverage-claim ("markuplint misses X" / "over-detects Y") against the bench, or when classifying a specific fixture. Trigger keywords: nu-only, ml-only, coverage gap, bench triage, verdict, match-error, match-clean, nu-over, excluded-ids, declare nu over-detection, claim audit, audit fixture, mark-up valid per spec, spec-cited exclusion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

Mirror a preset virtual rule (selectors under `nodeRules` in preset.html-standard.jsonc and similar) into bench/config.ts so the benchmark exercises it. Use when a new disallowed-element / similar selector lands in a preset and the matching nu fixtures remain stuck at nu-only despite the new rule existing in markuplint. Trigger keywords: virtual rule, nodeRules, disallowed-element, preset html-standard, bench config mirror, rule does not fire on bench, preset rule not exercised.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

Sync benchmark cross-reference blocks onto GitHub Issue bodies via `yarn bench:xref`, manage `tests/external/bench/issue-xref.config.ts` mappings, and run the pre-release checklist. Use when adding / removing / updating a primary or secondary mapping, when an issue closes upstream, when the xref CLI's output disagrees with what's on the issue body, or before cutting a release that touches a rule the benchmark covers. Trigger keywords: bench-xref, issue-xref, xref CLI, GitHub issue body, primary mapping, secondary mapping, umbrella block, pre-release checklist, bench-xref-audit workflow, marker version.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

markuplint/markuplint6302026년 10월 26일 업데이트

markuplint의 스킬 모두 보기

이 스킬의 문제 신고