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 · Dec 6, 2026

eslint-plugin-html has 867,590 recorded weekly downloads on npm, a decrease of 7.5% over the past 30 days, ranking #310 of 3,247 tracked listings.

Weekly downloads
867,590
Official API · Dec 5, 2026
7-day growth
+3.5%
+29.6K weekly downloads
30-day growth
-7.5%
-70.2K weekly downloads
90-day growth
+5.9%
+48.5K weekly downloads
Rank
#310
▼ 9 in 7 days

About eslint-plugin-html

<div align="center"> <img src="media/logo.svg" width="150" height="150"> <h1>eslint-plugin-html</h1> <a href="https://www.npmjs.com/package/eslint-plugin-html"><img alt="NPM version" src="https://img.shields.io/npm/v/eslint-plugin-html"></a> <a href="https://github.com/BenoitZugmeyer/eslint-plugin-html/actions/workflows/tests.yml"><img alt="Tests Status" src="https://img.shields.io/github/actions/workflow/status/BenoitZugmeyer/eslint-plugin-html/tests.yml"></a> <p>A <a href="http://eslint.org">ESLint</a> plugin to lint and fix inline scripts contained in HTML files.</p> </div>

Usage

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

<details open> <summary>Example with ESLint 9 and above (flat config)</summary>
import html from "eslint-plugin-html"

export default [
  {
    files: ["**/*.html"],
    plugins: { html },
  },
]
</details> <details> <summary>Example with ESLint 8 and below</summary>
{
  "plugins": ["html"]
}
</details>

Disabling ESLint

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

<!-- eslint-disable -->
<script>
  var foo = 1
</script>
<!-- eslint-enable -->

To disable ESLint for the next script tag only, use the <!-- eslint-disable-next-script --> HTML comment. Example:

<!-- eslint-disable-next-script -->
<script>
  var foo = 1
</script>

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:

import { defineConfig } from "eslint/config"
import parserHtml from "@html-eslint/parser"
import pluginHtml from "@html-eslint/eslint-plugin"
import pluginJs from "@eslint/js"
import pluginJsInHtml from "eslint-plugin-html"

export default defineConfig([
  {
    files: ["**/*.html"],
    plugins: {
      html: pluginHtml,
      jsInHtml: pluginJsInHtml,
      js: pluginJs,
    },
    languageOptions: {
      parser: parserHtml,
    },
    extends: ["js/recommended", "html/recommended"],
  },
])
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:

eslint .                              # lints JS
eslint -c eslint.config-html.js .     # lints HTML

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: <script type="module"> 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:

<details open> <summary>ESLint 9 and above (flat config)</summary>
export default [
  {
    // ...
    languageOptions: {
      sourceType: "module",
    },
  },
]
</details> <details> <summary>ESLint 8 and below</summary>
{
  "parserOptions": {
    "sourceType": "module"
  }
}
</details>

To illustrate this behavior, consider this HTML extract:

<script>
  var foo = 1
</script>

<script>
  alert(foo)
</script>

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…

Description from the npm listing.

  • eslint-plugin
  • eslintplugin
  • eslint
  • html

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

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

Adoption over time

eslint-plugin-html weekly downloads on npm, last 90 days: 867,590 weekly downloads as of Dec 5, 2026, +5.9% over 90 days.eslint-plugin-htmlWeekly downloads on npm · Last 90 days867,590downloads / week+5.9% over 90 days0200K400K600K800K1M1.2MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
eslint-plugin-html weekly downloads on npm, last 90 days: 867,590 weekly downloads as of Dec 5, 2026, +5.9% over 90 days.

7/30/90-day growth

eslint-plugin-html weekly downloads growth on npm: +3.5% over 7 days, -7.5% over 30 days, +5.9% over 90 days.eslint-plugin-htmlWeekly downloads growth on npm867,590downloads / week now7-day growth+29,556 weekly downloads+3.5%30-day growth-70,182 weekly downloads-7.5%90-day growth+48,496 weekly downloads+5.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-html weekly downloads growth on npm: +3.5% over 7 days, -7.5% over 30 days, +5.9% over 90 days.

Ranking history

eslint-plugin-html npm ranking history: currently #310 (by weekly downloads).eslint-plugin-htmlnpm ranking · by weekly downloads · Last 90 days#310current rank#270#280#290#300#310#320Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-html npm ranking history: currently #310 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 16, #10 (overall #310)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins290 listings · 15 pages · page 4, #7 (overall #67)
ESLint plugins: every listing in weekly downloads order

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.

Each band is one page of 20. Weekly downloads on a linear 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.

Recent observations

Full history (170)
Recent weekly downloads observations for eslint-plugin-html
Date (UTC)Weekly downloadsChange vs. previous
867,590+4.6K
863,037+6.2K
856,873+15.7K
841,216-12.7K
853,917+15.9K
838,003-920
838,923+889
838,034+4K
834,081-8.7K
842,770-14.7K
857,437+1.1K
856,378+2.7K
853,646-7.8K
861,493—

Similar npm ESLint plugins plugins

All 20 eslint-plugin-html alternatives

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 Dec 6, 2026. See the methodology.