跳到正文
cccskills
免费在 GitHub 公开

markuplint

Reference knowledge for Markuplint HTML linter. Covers violation interpretation, CLI usage, config patterns, and documentation URLs. Auto-loaded when working with HTML linting.

中文简介正在准备中。当前显示原文说明。

markuplint/markuplint星标 630(GitHub 630 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Markuplint

Reference knowledge for working with Markuplint.

What is Markuplint

An HTML linter that checks conformance with HTML Standard, WAI-ARIA, and project-specific rules. Supports JSX, Vue, Svelte, Astro, Pug, PHP, and more via parser plugins.

Documentation base URL: check the installed version with npx markuplint --version. If it contains alpha, beta, or rc, replace https://markuplint.dev with https://next.markuplint.dev in every documentation URL below — the stable site does not document prerelease behavior.

Reading Violation Messages

Format: message (ruleId) [named-rule]

The attribute name is duplicated (no-duplicate-attr) [html-standard/attr-duplication]
  • ruleId (no-duplicate-attr) — the base rule. Always present.
  • named-rule (html-standard/attr-duplication) — preset-defined alias. Present only for named rules. The namespace/ prefix indicates which preset defined it (e.g., a11y/, html-standard/, performance/).
  • severity — error (exit code 1), warning (exit code 0 by default), or info.

To look up any rule: https://markuplint.dev/docs/rules/{ruleId}

CLI Quick Reference

# Basic lint
npx markuplint "src/**/*.html"

# JSON output (for programmatic use)
npx markuplint "src/**/*.html" --format JSON

# Auto-fix (rules that support it)
npx markuplint "src/**/*.html" --fix

# Preview fixes without writing
npx markuplint "src/**/*.html" --fix-dry-run

# Suppress current violations for gradual adoption
npx markuplint "src/**/*.html" --suppress

# Clean up fixed suppressions
npx markuplint "src/**/*.html" --prune-suppressions

# GitHub Actions annotations
npx markuplint "src/**/*.html" --format GitHub

# Limit output for large projects
npx markuplint "src/**/*.html" --max-count=50

Always quote glob patterns to prevent shell expansion.

Config Patterns

Disable a named rule

{ "rules": { "a11y/html-lang": false } }

Disable all rules in a namespace

{ "rules": { "a11y/*": false } }

Change severity

{ "rules": { "a11y/html-lang": "warning" } }

Element-specific rules

nodeRules — targets the matched element. childNodeRules — targets descendants (add "inheritance": true for all descendants, not just direct children).

Ancestor matching

Use :is(selector *). Do NOT use :closest() — it is deprecated.

{ "selector": "div:is(nav *)" }

Common Issues and Fixes

OGP / Open Graph property attribute

The property attribute is not in the HTML spec. See: https://markuplint.dev/docs/rules/no-unknown-attr#the-open-graph-protocol

no-unknown-attr with frameworks

Install the framework's spec plugin (e.g., @markuplint/react-spec). See: https://markuplint.dev/docs/guides/beyond-html#why-need-the-spec-plugins

no-unescaped-char false positives with template engines

Default mode only flags a literal <. The strict option (also flagging >, ", a bare &) can trigger false positives with some template syntaxes. Disable partially, turn off strict, or report: https://markuplint.dev/docs/rules/no-unescaped-char

--init is interactive only

npx markuplint --init requires terminal input. AI agents should write .markuplintrc directly.

Documentation URLs

TopicURL
All ruleshttps://markuplint.dev/docs/rules
Specific rulehttps://markuplint.dev/docs/rules/{rule-id}
Presetshttps://markuplint.dev/docs/guides/presets
Framework setuphttps://markuplint.dev/docs/guides/beyond-html
Config propertieshttps://markuplint.dev/docs/configuration/properties
Selectorshttps://markuplint.dev/docs/guides/selectors
CLI optionshttps://markuplint.dev/docs/guides/cli
FAQhttps://markuplint.dev/docs/guides/faq
Migration (v4→v5)https://markuplint.dev/docs/migration/v4-to-v5

Use WebFetch on these URLs when you need current details.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 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 的全部技能

报告此技能的问题