ESLint HTML Parser
JSON →eslint-html-parser is a custom ESLint parser designed to lint HTML files, including embedded JavaScript within `<script>` tags. It achieves this by parsing HTML into a specific Abstract Syntax Tree (AST) structure, while delegating the parsing of JavaScript code (both in `<script>` tags and standalone `.js`/`.jsx` files) to a configurable ECMAScript parser, defaulting to `espree`. This enables developers to apply standard ESLint rules to their JavaScript within HTML, as well as define custom rules that target the HTML structure itself. The package is currently at version 6.8.2 and appears to be actively maintained, offering a crucial bridge for projects that require robust linting across both HTML and JavaScript within a single ESLint setup. It differentiates itself by providing a comprehensive HTML AST for deep linting, unlike simpler preprocessors that only extract script content.
Traffic · last 30 days ↑67% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France