Skip to content
PluginStats

eslint-plugin-no-unsanitized weekly downloads statistics

By mozilla (3 listings) · npm · ESLint plugins

ESLint rule to disallow unsanitized code

View on npm Fresh · Oct 18, 2026

eslint-plugin-no-unsanitized has 627,363 recorded weekly downloads on npm, a decrease of 30.8% over the past 30 days, ranking #251 of 2,322 tracked listings.

Weekly downloads
627,363
Official API · Oct 18, 2026
7-day growth
-38.3%
-389.1K weekly downloads
30-day growth
-30.8%
-279.2K weekly downloads
90-day growth
-30.3%
-273.2K weekly downloads
Rank
#251
Among tracked npm listings

About eslint-plugin-no-unsanitized

Build Status

Disallow unsanitized code (no-unsanitized)

These rules disallow unsafe coding practices that may result into security vulnerabilities. We will disallow assignments (e.g., to innerHTML) as well as calls (e.g., to insertAdjacentHTML) without the use of a pre-defined escaping function. The escaping functions must be called with a template string. The function names are hardcoded as Sanitizer.escapeHTML and escapeHTML. The plugin also supports the Sanitizer API and calls to .setHTML() are also allowed by default.

This plugin is built for and used within Mozilla to maintain and improve the security of our products and services.

Rule Details

method

The method rule disallows certain function calls. E.g., document.write() or insertAdjacentHTML(). See docs/rules/method.md for more.

property

The property rule disallows certain assignment expressions, e.g., to innerHTML.

See docs/rules/property.md for more.

Examples

Here are a few examples of code that we do not want to allow:

foo.innerHTML = input.value;
bar.innerHTML = "<a href='" + url + "'>About</a>";

A few examples of allowed practices:

foo.innerHTML = 5;
bar.innerHTML = "<a href='/about.html'>About</a>";
bar.innerHTML = escapeHTML`<a href='${url}'>About</a>`;

Install

With yarn or npm:

$ yarn add -D eslint-plugin-no-unsanitized
$ npm install --save-dev eslint-plugin-no-unsanitized

Usage

Flat config
import nounsanitized from "eslint-plugin-no-unsanitized";

export default config = [nounsanitized.configs.recommended];

or

import nounsanitized from "eslint-plugin-no-unsanitized";

export default config = [
    {
        files: ["**/*.js"],
        plugins: { nounsanitized },
        rules: {
            "nounsanitized/method": "error",
            "nounsanitized/property": "error",
        },
    },
];
eslintrc

In your .eslintrc.json file enable this rule with the following:

{
    "extends": ["plugin:no-unsanitized/recommended-legacy"]
}

Or:

{
    "plugins": ["no-unsanitized"],
    "rules": {
        "no-unsanitized/method": "error",
        "no-unsanitized/property": "error"
    }
}

Documentation

See docs/.

Description from the npm listing.

  • eslint
  • eslint-plugin
  • eslintplugin
  • lint
  • sanitize
  • innerHTML
  • security

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-no-unsanitized weekly downloads on npm, last 90 days: 627,363 weekly downloads as of Oct 18, 2026, -30.3% over 90 days.eslint-plugin-no-unsanitizedWeekly downloads on npm · Last 90 days627,363downloads / week-30.3% over 90 days500K600K700K800K900K1M1.1M1.2MJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
eslint-plugin-no-unsanitized weekly downloads on npm, last 90 days: 627,363 weekly downloads as of Oct 18, 2026, -30.3% over 90 days.

7/30/90-day growth

eslint-plugin-no-unsanitized weekly downloads growth on npm: -38.3% over 7 days, -30.8% over 30 days, -30.3% over 90 days.eslint-plugin-no-unsanitizedWeekly downloads growth on npm627,363downloads / week now7-day growth-389,069 weekly downloads-38.3%30-day growth-279,171 weekly downloads-30.8%90-day growth-273,203 weekly downloads-30.3%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
eslint-plugin-no-unsanitized weekly downloads growth on npm: -38.3% over 7 days, -30.8% over 30 days, -30.3% over 90 days.

Ranking history

eslint-plugin-no-unsanitized npm ranking history: currently #251 (by weekly downloads).eslint-plugin-no-unsanitizednpm ranking · by weekly downloads · Last 90 days#251current rank#249#250#251#252#253#254Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
eslint-plugin-no-unsanitized npm ranking history: currently #251 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 13, #11 (overall #251)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins256 listings · 13 pages · page 3, #12 (overall #52)
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 (122)
Recent weekly downloads observations for eslint-plugin-no-unsanitized
Date (UTC)Weekly downloadsChange vs. previous
627,363+106.5K
520,890-103.8K
624,662+23.7K
600,927-204.8K
805,742-218.6K
1,024,2950
1,024,295+7.9K
1,016,432+16.6K
999,803+4.5K
995,316+9.1K
986,182+2.4K
983,749+21.2K
962,519-198.4K
1,160,880—

Similar npm ESLint plugins plugins

All 20 eslint-plugin-no-unsanitized 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-no-unsanitized. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.