Skip to content
PluginStats

eslint-plugin-html weekly downloads statistics

By BenoitZugmeyer · npm · ESLint plugins

A ESLint plugin to lint and fix inline scripts contained in HTML files.

View on npm Fresh · Oct 17, 2026

eslint-plugin-html has 396,841 recorded weekly downloads on npm, a decrease of 51.5% over the past 30 days.

It ranks #273 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -55.1%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
396,841
Official API · Oct 17, 2026
7-day growth
-46.5%
-344.2K weekly downloads
30-day growth
-51.5%
-421K weekly downloads
90-day growth
-55.1%
-486.9K weekly downloads
Rank
#273
Among tracked npm listings

About eslint-plugin-html

eslint-plugin-html

A ESLint plugin to lint and fix inline scripts contained in HTML files.

• Usage • Disabling ESLint • Linting HTML • Manual configuration • Use two configuration files • Multiple scripts tags in a HTML file • History • XML support • Settings • html/html-extensions • html/xml-extensions • html/indent • html/report-bad-indent • html/javascript-tag-names • html/javascript-mime-types • html/ignore-tags-without-type • Troubleshooting • No file linted when running eslint on a directory • Linting templates (or PHP) • Linting VUE files • Migration from older versions • To v4 • To v3 • Credits

Usage

Simply install via npm install --save-dev eslint-plugin-html and add the plugin to your ESLint configuration. See ESLint documentation.

Example with ESLint 9 and above (flat config)

Example with ESLint 8 and below

Disabling ESLint

To temporarily disable ESLint, use the HTML comment. Re-enable it with . Example:

To disable ESLint for the next script tag only, use the HTML comment. Example:

Disabled script tags are completely ignored: their content will not be parsed as JavaScript. You can use this to disable script tags containing template syntax.

Linting HTML

This plugin focuses on applying ESLint rules on inline scripts contained in HTML. It does not provide any rule related to HTML. For that, you can use other plugins like @html-eslint or @angular-eslint. This plugin is not compatible with the ESLint language option (this is an ESLint limitation). To lint both HTML and JS within script tags, you have two alternatives:

Manual configuration

Provide the html-eslint plugin option manually, without relying on the language option:

Use two configuration files

eslint.config.js with the eslint-plugin-html plugin to lint all JavaScript code and eslint.config-html.js with the html-eslint plugin for HTML rules.

Run ESLint once with each configuration:

This alternative works well in CI and hooks, but might be limited in text editors where only one config is applied.

Multiple scripts tags in a HTML file

When linting a HTML with multiple script tags, this plugin tries to emulate the browser behavior by sharing the global scope between scripts by default. This behavior doesn't apply to "module" scripts (ie: and most transpiled code), where each script tag gets its own top-level scope.

ESLint has already an option to tell the parser if the script are modules. eslint-plugin-html will use this option as well to know if the scopes should be shared (the default) or not. To change this, just set it in your ESLint configuration:

ESLint 9 and above (flat config)

ESLint 8 and below

To illustrate this behavior, consider this HTML extract:

This is perfectly valid by default, and the ESLint rules no-unused-vars and no-undef shouldn't complain. But if those scripts are considerated as ES modules, no-unused-vars should report an error in the first script, and no-undef should report an error in the second script.

History

In eslint-plugin-html v1 and v2, script code were concatenated and linted in a single pass, so the scope were always shared. This caused some issues, so in v3 all scripts were linted separately, and scopes were never shared. In v4, the plugin still lint scripts separately, but makes sure global variables are declared and used correctly in the non-module case.

XML support

This plugin parses HTML and XML markup slightly differently, mainly when considering CDATA sections:

• in XML, any data inside a CDATA section will be considered as raw text (not XML) and the CDATA delimiter will be dropped ; • in HTML, there is no such thing for tags: the CDATA delimiter is considered as normal text and thus, part of the script.

Settings

Note: all settings can be written either as "html/key": value or in a nested object "html": { "key": value }

html/html-extensions

By default, this plugin will only consider files ending with those extensions as HTML: .erb, .handlebars, .hbs, .htm, .html, .mustache, .nunjucks, .php, .tag, .twig, .we. You can set your own list of HTML extensions by using this setting. Example:

ESLint 9 and above (flat config)

Note: you need to specify extensions twice, which is not ideal. This should be improved in the future.

ESLint 8 and below

html/xml-extensions

By default, this plugin will only consider files ending with those extensions as XML: .xhtml, .xml. You can set your own list of XML extensions by using this setting. Example:

ESLint 9 and above (flat config)

Note: you need to specify extensions twice, which is not ideal. This should be improved in the future.

ESLint 8 and below

html/indent

By default, the code between tags is dedented according to the first non-empty line. The setting html/indent allows to ensure that every script tags follow an uniform indentation. Like the indent rule, you can pass a number of spaces, or "tab" to indent with one tab. Prefix this value with a + to be relative to the tag indentation. Example:

ESLint 9 and above (flat config)

ESLint 8 and below

html/report-bad-indent

By default, this plugin won't warn if it encounters a problematic indentation (ex: a line is under indented). If you want to make sure the indentation is correct, use the html/report-bad-indent in conjunction with the indent rule. Pass "warn" or 1 to display warnings, "error" or 2 to display errors. Example:

ESLint 9 and above (flat config)

ESLint 8 and below

html/javascript-tag-names

By default, the code between tags is considered as JavaScript. You can customize which tags should be considered JavaScript by providing one or multiple tag names.

Example:

ESLint 9 and above (flat config)

ESLint 8 and below

html/javascript-mime-types…

Description from the npm listing.

  • eslint-plugin
  • eslintplugin
  • eslint
  • html

Where eslint-plugin-html sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 14, #13 (overall #273)
All npm: every listing in weekly downloads order
PNG SVG
ESLint plugins252 listings · 13 pages · page 3, #18 (overall #58)
ESLint plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-html weekly downloads on npm, last 90 days: 396,841 weekly downloads as of Oct 17, 2026, -55.1% over 90 days.eslint-plugin-htmlWeekly downloads on npm · Last 90 days396,841downloads / week-55.1% over 90 days300K400K500K600K700K800K900K1M1.1MJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
eslint-plugin-html weekly downloads on npm, last 90 days: 396,841 weekly downloads as of Oct 17, 2026, -55.1% over 90 days.
PNG SVG

7/30/90-day growth

eslint-plugin-html weekly downloads growth on npm: -46.5% over 7 days, -51.5% over 30 days, -55.1% over 90 days.eslint-plugin-htmlWeekly downloads growth on npm396,841downloads / week now7-day growth-344,242 weekly downloads-46.5%30-day growth-421,002 weekly downloads-51.5%90-day growth-486,887 weekly downloads-55.1%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
eslint-plugin-html weekly downloads growth on npm: -46.5% over 7 days, -51.5% over 30 days, -55.1% over 90 days.
PNG SVG

Ranking history

eslint-plugin-html npm ranking history: currently #273 (by weekly downloads).eslint-plugin-htmlnpm ranking · by weekly downloads · Last 90 days#273current rank#271#272#273#274#275Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
eslint-plugin-html npm ranking history: currently #273 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (121)
Recent weekly downloads observations for eslint-plugin-html
Date (UTC)Weekly downloadsChange vs. previous
396,841-69K
465,841+41.9K
423,981-152.2K
576,203-147.2K
723,4430
723,443-15K
738,469-2.6K
741,083-3.7K
744,795-2.8K
747,591-15.8K
763,406-17.9K
781,338-145.2K
926,576-19.8K
946,368—

Similar npm ESLint plugins plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/eslint-plugin-html. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.