Skip to content
PluginStats

eslint-plugin-no-secrets weekly downloads statistics

By nickdeis · npm · ESLint plugins

An eslint rule that searches for potential secrets/keys in code

View on npm Fresh · Dec 6, 2026

eslint-plugin-no-secrets has 418,368 recorded weekly downloads on npm, an increase of 3.8% over the past 30 days, ranking #425 of 3,247 tracked listings.

Weekly downloads
418,368
Official API · Dec 5, 2026
7-day growth
+7.7%
+30K weekly downloads
30-day growth
+3.8%
+15.3K weekly downloads
90-day growth
+63.0%
+161.7K weekly downloads
Rank
#425
▼ 6 in 7 days

About eslint-plugin-no-secrets

Build Status

eslint-plugin-no-secrets

An eslint rule that searches for potential secrets/keys in code and JSON files.

This plugin has two rules:

  • no-secrets: Find potential secrets using cryptographic entropy or patterns in the AST (acts like a standard eslint rule, more configurable)
  • no-pattern-match: Find potential secrets in text (acts like grep, less configurable, but potentially more flexible)

<!-- vscode-markdown-toc --> <!-- vscode-markdown-toc-config numbering=true autoSave=true /vscode-markdown-toc-config --> <!-- /vscode-markdown-toc -->

1. <a name='Usage'></a>Usage

npm i -D eslint-plugin-no-secrets

1.1. <a name='Flatconfig'></a>Flat config

eslint.config.js

import noSecrets from "eslint-plugin-no-secrets";

export default [
  {
    files: ["**/*.js"],
    plugins: {
      "no-secrets": noSecrets,
    },
    rules: {
      "no-secrets/no-secrets": "error",
    },
  },
];
1.2. <a name='eslintrc'></a>eslintrc

.eslintrc

{
  "plugins": ["no-secrets"],
  "rules": {
    "no-secrets/no-secrets": "error"
  }
}
//Found a string with entropy 4.3 : "ZWVTjPQSdhwRgl204Hc51YCsritMIzn8B=/p9UyeX7xu6KkAGqfm3FJ+oObLDNEva"
const A_SECRET =
  "ZWVTjPQSdhwRgl204Hc51YCsritMIzn8B=/p9UyeX7xu6KkAGqfm3FJ+oObLDNEva";
//Found a string that matches "AWS API Key" : "AKIAIUWUUQQN3GNUA88V"
const AWS_TOKEN = "AKIAIUWUUQQN3GNUA88V";
1.3. <a name='IncludeJSONfiles'></a>Include JSON files

To include JSON files, install eslint-plugin-jsonc or @eslint/json (if using ESLint version 9.6 or above)

npm install --save-dev eslint-plugin-jsonc

Then in your .eslint configuration file, extend the jsonc base config

{
  "extends": ["plugin:jsonc/base"]
}

or if you are using ESLint 9.6 or above

module.exports = [
  {
    plugins: {
      json,
      "no-secrets": noSecret,
    },
  },
  {
    files: ["**/*.json"],
    language: "json/json",
    ....
  },
];
1.3.1. <a name='IncludeJSONfileswithinflatconfigs'></a>Include JSON files with in "flat configs"

eslint.config.js

import noSecrets from "eslint-plugin-no-secrets";
import jsoncExtend from "eslint-plugin-jsonc";

export default [
  ...jsoncExtend.configs["flat/recommended-with-jsonc"],
  {
    languageOptions: { ecmaVersion: 6 },
    plugins: {
      "no-secrets": noSecrets,
    },
    rules: {
      "no-secrets/no-secrets": "error",
    },
  },
];

2. <a name='no-secrets'></a>no-secrets

no-secrets is a rule that does two things:

  1. Search for patterns that often contain sensitive information
  2. Measure cryptographic entropy to find potentially leaked secrets/passwords

It's modeled after early truffleHog, but acts on ECMAscripts AST. This allows closer inspection into areas where secrets are commonly leaked like string templates or comments.

2.1. <a name='no-secretsexamples'></a>no-secrets examples

Decrease the tolerance for entropy

{
  "plugins": ["no-secrets"],
  "rules": {
    "no-secrets/no-secrets": ["error", { "tolerance": 3.2 }]
  }
}

Add additional patterns to check for certain token formats.
Standard patterns can be found here

{
  "plugins": ["no-secrets"],
  "rules": {
    "no-secrets/no-secrets": [
      "error",
      {
        "additionalRegexes": {
          "Basic Auth": "Authorization: Basic [A-Za-z0-9+/=]*"
        }
      }
    ]
  }
}
2.2. <a name='Whenitsreallynotasecret'></a>When it's really not a secret
2.2.1. <a name='Eitherdisableitwithacomment'></a> Either disable it with a comment
// Set of potential base64 characters
// eslint-disable-next-line no-secrets/no-secrets
const BASE64_CHARS =
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

This will tell future maintainers of the codebase that this suspicious string isn't an oversight

2.2.2. <a name='usetheignoreContenttoignorecertaincontent'></a> use the ignoreContent to ignore certain content
{
  "plugins": ["no-secrets"],
  "rules": {
    "no-secrets/no-secrets": ["error", { "ignoreContent": "^ABCD" }]
  }
}
2.2.3. <a name='UseignoreIdentifierstoignorecertainvariablepropertynames'></a> Use ignoreIdentifiers to ignore certain variable/property names
{
  "plugins": ["no-secrets"],
  "rules": {
    "no-secrets/no-secrets": [
      "error",
      { "ignoreIdentifiers": ["BASE64_CHARS"] }
    ]
  }
}
2.2.4. <a name='UseadditionalDelimiterstofurthersplituptokens'></a> Use additionalDelimiters to further split up tokens…

Description from the npm listing.

  • eslint
  • eslint-plugin
  • security
  • secure
  • secrets
  • lint
  • eslintplugin

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-secrets weekly downloads on npm, last 90 days: 418,368 weekly downloads as of Dec 5, 2026, +63.0% over 90 days.eslint-plugin-no-secretsWeekly downloads on npm · Last 90 days418,368downloads / week+63.0% over 90 days0100K200K300K400K500KSep 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-no-secrets weekly downloads on npm, last 90 days: 418,368 weekly downloads as of Dec 5, 2026, +63.0% over 90 days.

7/30/90-day growth

eslint-plugin-no-secrets weekly downloads growth on npm: +7.7% over 7 days, +3.8% over 30 days, +63.0% over 90 days.eslint-plugin-no-secretsWeekly downloads growth on npm418,368downloads / week now7-day growth+30,033 weekly downloads+7.7%30-day growth+15,285 weekly downloads+3.8%90-day growth+161,727 weekly downloads+63.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-no-secrets weekly downloads growth on npm: +7.7% over 7 days, +3.8% over 30 days, +63.0% over 90 days.

Ranking history

eslint-plugin-no-secrets npm ranking history: currently #425 (by weekly downloads).eslint-plugin-no-secretsnpm ranking · by weekly downloads · Last 90 days#425current rank#100#150#200#250#300#350#400#450Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-no-secrets npm ranking history: currently #425 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 22, #5 (overall #425)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins290 listings · 15 pages · page 5, #16 (overall #96)
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 (591)
Recent weekly downloads observations for eslint-plugin-no-secrets
Date (UTC)Weekly downloadsChange vs. previous
418,368-3.3K
421,672+11.6K
410,085+5.2K
404,889+4.9K
400,014+8.2K
391,817+968
390,849+2.5K
388,335-2.5K
390,818-15K
405,823-9.4K
415,201-9.2K
424,434-5.8K
430,216-11.2K
441,442—

Similar npm ESLint plugins plugins

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