Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
An ESLint plugin for linting HTML files, HTML in JavaScript Template Literals, React, Angular and Svelte.
HTML ESLint is an open-source ESLint plugin and monorepo that brings rule-based linting to HTML markup, including React component HTML, with an online playground and a dedicated rules catalog.
HTML ESLint is a monorepo hosted at github.com/yeonjuan/html-eslint that packages @html-eslint/eslint-plugin, an ESLint plugin for linting HyperText Markup Language. It takes HTML files, HTML embedded in JavaScript template literals, and React, Angular, or Svelte component markup as input, and outputs standard ESLint diagnostics that surface syntax and style problems in your editor and CI. The project is developed by yeonjuan and released under the MIT License. It intentionally lints only HTML syntax; JavaScript inside HTML is out of scope, and the README explicitly recommends eslint-plugin-html for that job.
HTML ESLint is for developers and teams who already use ESLint and want the same enforcement for their HTML markup. Front-end developers use it to catch malformed tags and enforce consistent formatting in plain HTML files. React developers use the accompanying React configuration to lint HTML within their component code. Developers working with Angular or Svelte templates can apply the same plugin to their markup, and teams using template engines can follow the integration guide. It is also useful for maintainers who want a standardized, rule-driven alternative to bespoke HTML validators.
@html-eslint/eslint-plugin and adding it to your ESLint plugins and rules configuration.The plugin works through ESLint's normal plugin mechanism. You install the package, register it in your ESLint configuration, and select the rules you want to enable. The getting-started documentation at html-eslint.org/docs/getting-started walks through installation, configuration, and editor integration step by step. When you run ESLint on an HTML file, the plugin parses the markup and reports rule violations using ESLint's standard output format.
Yes. The project is distributed under the MIT License, and the GitHub repository includes a Buy Me a Coffee link for optional donations.
No. HTML ESLint lints HTML syntax only. For linting inline JavaScript in HTML files, the README explicitly recommends using eslint-plugin-html instead.
According to the repository metadata, it lints HTML files, HTML in JavaScript Template Literals, React, Angular, and Svelte. The monorepo includes a dedicated section and rules for React.
Install the @html-eslint/eslint-plugin npm package, add it to your ESLint configuration, and run ESLint on your HTML files. The official getting-started guide covers installation, configuration, and editor setup.
