Skip to main content

code-quality-checks

Quality gates for static HTML/CSS websites (validation, linting, accessibility, link checking)

来源信息

仓库
Hack23/riksdagsmonitor
最近来源活动
2026年4月16日 09:31
检测到的 SKILL.md 语言
英语
星标
12
分支
4

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
code-quality-checks
description
Quality gates for static HTML/CSS websites (validation, linting, accessibility, link checking)
license
Apache-2.0
# Code Quality Checks ## 🔴 AI FIRST Quality Principle > **Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.** ## Purpose Enforce quality standards for Riksdagsmonitor static HTML/CSS website. ## Quality Gates ### HTML Validation (HTMLHint) ```bash npm install -g htmlhint # Validate all HTML files htmlhint *.html # Custom rules (.htmlhintrc) { "tagname-lowercase": true, "attr-lowercase": true, "attr-value-double-quotes": true, "doctype-first": true, "tag-pair": true, "spec-char-escape": true, "id-unique": true, "src-not-empty": true, "attr-no-duplication": true } ``` ### CSS Validation (CSSLint) ```bash npm install -g csslint # Validate CSS csslint styles.css # Custom rules (.csslintrc) { "adjoining-classes": false, "box-model": true, "box-sizing": false, "duplicate-properties": true, "empty-rules": true, "import": true, "important": false, "known-properties": true } ``` ### Link Checking (linkinator) ```bash npm install -g linkinator # Start local server python3 -m http.server 8080 & # Check all links linkinator http://localhost:8080/ --recurse --silent ``` ### Accessibility (axe-core) ```bash npm install -g @axe-core/cli # Check accessibility axe https://riksdagsmonitor.com --tags wcag2a,wcag2aa ``` ## Quality Standards - ✅ 0 HTML validation errors - ✅ 0 broken links - ✅ 0 accessibility violations (WCAG 2.1 AA) - ✅ CSS validation warnings only - ✅ 4.5:1 color contrast minimum ## References - **HTMLHint**: https://htmlhint.com/ - **linkinator**: https://github.com/JustinBeckwith/linkinator - **axe-core**: https://github.com/dequelabs/axe-core-npm
在 GitHub 查看