Skip to content

htmlacademy/linthtml-config-htmlacademy

Repository files navigation

LintHTML Config for HTML Academy Codeguide

npm version test license

LintHTML configuration for HTML markup validation according to HTML Academy Codeguide.

Requirements

  • Node.js >= 24
  • @linthtml/linthtml >= 0.10.0

Installation

npm install -D @linthtml/linthtml linthtml-config-htmlacademy

Usage

Create a .linthtmlrc configuration file in your project root:

{
  "extends": "linthtml-config-htmlacademy"
}

Extending the Config

Add a rules key after extends to override or supplement rules:

{
  "extends": "linthtml-config-htmlacademy",
  "rules": {
    "line-max-len": [true, 120]
  }
}

Rules

This config activates every rule from linthtml-rules-htmlacademy with HTML Academy defaults. See the full list of rules.

VS Code Integration

Install the LintHTML extension to see errors highlighted in VS Code.

The configuration file must be named .linthtmlrc as required by the extension.

VS Code error highlighting

CLI Usage

Add a script to your package.json:

{
  "scripts": {
    "lint:html": "linthtml source/*.html --config .linthtmlrc"
  }
}
  • linthtml — runs HTML validation
  • source/*.html — path to HTML files
  • --config .linthtmlrc — path to configuration file

Links

About

LintHTML Config for HTML Academy

Topics

Resources

License

Stars

Watchers

Forks

Contributors