LintHTML configuration for HTML markup validation according to HTML Academy Codeguide.
- Node.js >= 24
@linthtml/linthtml>= 0.10.0
npm install -D @linthtml/linthtml linthtml-config-htmlacademyCreate a .linthtmlrc configuration file in your project root:
{
"extends": "linthtml-config-htmlacademy"
}Add a rules key after extends to override or supplement rules:
{
"extends": "linthtml-config-htmlacademy",
"rules": {
"line-max-len": [true, 120]
}
}This config activates every rule from linthtml-rules-htmlacademy with HTML Academy defaults. See the full list of rules.
Install the LintHTML extension to see errors highlighted in VS Code.
The configuration file must be named
.linthtmlrcas required by the extension.
Add a script to your package.json:
{
"scripts": {
"lint:html": "linthtml source/*.html --config .linthtmlrc"
}
}linthtml— runs HTML validationsource/*.html— path to HTML files--config .linthtmlrc— path to configuration file
