dotnet-htmlhint

Configures HTMLHint lint gates for static HTML output in .NET repositories.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-htmlhint-zhenpenglai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-htmlhint
Source: https://github.com/zhenpengLai/myuseskill/tree/main/dotnet-htmlhint
Command: npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-htmlhint-zhenpenglai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires htmlhint.

What problem does it solve? .NET repositories that ship static HTML pages or generated frontend output often lack a focused lint gate for DOM structure, invalid attributes, and basic HTML correctness, letting markup errors slip into deployed pages. ## Core Features & Use Cases - Targeted HTML Linting: Sets up HTMLHint against the right target, whether source templates, built output in dist/ or wwwroot/, or a served URL. - Repeatable Repo-Local Setup: Installs HTMLHint as a dev dependency, adds .htmlhintrc config, and wires narrow scripts into package.json and AGENTS.md. - Boundary Management: Keeps HTMLHint scoped to static HTML correctness while routing JavaScript linting to ESLint and runtime audits to webhint. - Use Case: A team publishes a static site from an ASP.NET project and wants CI to fail on invalid attributes or malformed DOM structure in the generated HTML before deployment. ## Quick Start Add HTMLHint to lint the built static HTML output in this repository and wire it into package.json scripts.

Frequently Asked Questions about dotnet-htmlhint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add HTMLHint to a .NET project?▼

Install HTMLHint as a repo-local dev dependency with npm install --save-dev htmlhint, then add a .htmlhintrc config and narrow package.json scripts such as htmlhint "dist/**/*.html". Verify the setup with npx htmlhint against your actual output files.

How to lint generated HTML output before deployment?▼

Point HTMLHint at the built output directory such as dist/ or wwwroot/ rather than source files, using a glob like htmlhint "dist/**/*.html". Rerun the publish or frontend build flow first so the linted HTML matches what actually ships.

Why does HTMLHint fail on Razor or Blazor pages?▼

HTMLHint fails on Razor and Blazor source because server-side directives confuse its parser. This is a target-selection problem: lint the rendered or published HTML output instead of forcing raw .cshtml or .razor templates through the tool.

Can HTMLHint check a live URL instead of local files?▼

Yes, HTMLHint can check a reachable URL when the page is already served. However, URL-based checks can fail on authentication, SPA routing, or environment drift, so verify the served target is stable before trusting results.

When should I use webhint instead of HTMLHint?▼

Use webhint when you need runtime audits covering performance, accessibility, SEO, or HTTP headers. HTMLHint is scoped to static HTML correctness such as DOM structure and invalid attributes, not full-site runtime analysis.