Skip to content
PluginStats

eslint-plugin-regex weekly downloads statistics

By gmullerb · npm · ESLint plugins

ESLint rules using Regular Expression

View on npm Fresh · Oct 17, 2026

eslint-plugin-regex has 54,023 recorded weekly downloads on npm, a decrease of 59.8% over the past 30 days.

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

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

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

Weekly downloads
54,023
Official API · Oct 17, 2026
7-day growth
-57.3%
-72.5K weekly downloads
30-day growth
-59.8%
-80.4K weekly downloads
90-day growth
-59.0%
-77.8K weekly downloads
Rank
#541
Among tracked npm listings

About eslint-plugin-regex

ESLint rules using Regular Expressions

Quick Start

1 . Add dependencies:

package.json:

2 . Configure eslint:

Short configuration:

.eslintrc.json:

Files will be checked for the absence of invalidRegex1 and invalidRegexN, and for the presence of requiredRegex1 and requiredRegexN, and files with name matching ignoreFilesRegex will not be checked.

Detailed configuration:

.eslintrc.json:

Files will be checked for:

• The absence of invalidRegex1 but if found it will be replaced with newValue. • The absence of invalidRegexN only in files with name not matching ignoreFilesRegexN, but if found errorMessageN will be shown. • The presence of requiredRegex1 only in files with name matching inspectFilesRegex1, but if not found errorMessage1 will be shown. • The presence of requiredRegexN only in files with name matching inspectFilesRegexA and not matching ignoreFilesRegexZ.

Goals

The idea is to allow the creation of different eslint rules based on Regular Expressions in order to have some "freedom" to create quick ESLint custom rules.

Rules

Name | Fixable | Description

regex/invalid | Yes | checks that specified patterns are not found regex/required | No | checks that specified patterns are found

Each rule defines a set of patterns:

📏 regex/invalid

This rule checks that specified patterns are not found in files, i.e. Invalid patterns.

✏ Example of incorrect code for this rule:

The error message will reflect the exact location, e.g.:

✏ Example of correct code for this rule:

📏 regex/required

This rule looks for specific patterns that must be present in each file, i.e. Required patterns.

✏ Example of incorrect code for this rule:

The error message will point to the beginning of the file, e.g.:

✏ Example of correct code for this rule:

Options

Both rule has two options:

• array of patterns definitions to analyze. [REQUIRED] • Each pattern definition can be 'Short' or 'Detailed'. • a string representing the regular expression for ignoring files for all patterns. [OPTIONAL]

The *string* representing the regular expression

Remember, Slashes (/) are not required in the string that defines the regex,

e.g. To get the following regex /^(test|spec)$/, define:

• "^(test|spec)$", when using .eslintrc.js or .eslintrc.json.

e.g. To get the following regex /\bhttp:/, define:

• "\bhttp:", when using .eslintrc.js, or • "\\bhttp:", when using .eslintrc.json. (backslash needs to be double in a json file)

e.g. To get the following regex /.*test\.js/, define:

• ".*test\.js", when using .eslintrc.js, or • ".*test\\.js", when using .eslintrc.json. (backslash needs to be double in a json file)

Short pattern definition

Each pattern is specified by just a string representing the regular expression, i.e. "regex"

Detailed pattern definition

It is specified by an object, with the following fields:

• regex: A required string for regex/required and regex/invalid representing the Regular expression to look for. [REQUIRED] • flags: A combination of flags, i, s and/or u, to be used by the Regular Expression. [OPTIONAL] • replacement for regex/invalid [1]: [OPTIONAL] • An optional string used to replace the invalid found pattern, or • An optional object that establish how the invalid found pattern will be replaced: • function: used to replace the invalid found pattern. • It will receive 3 parameters: text, captured and $, that can be used as desired. • It must return a string value, if not, return value will be ignored. • Its definition must be only the body of the function. • One must be defined, either the string or function. • id: An optional string representing the Pattern Id. [OPTIONAL] • message: An optional string specifying the Message to be shown when an error happens (invalid regex is found or required regex is not found). [OPTIONAL] • files: An optional object specifying which files to analyze: [OPTIONAL] • ignore: A string representing Regular expression of the files to be ignored when validating this specific pattern. • inspect: A string representing Regular expression of the files to be inspected when validating this specific pattern.

* regex is the only Required field. * When ignore and inspect are present, ignore takes precedence. * Global ignore file pattern, takes precedence over files patterns.

[1] In order to fix issues eslint must be run with --fix option.

Using message is pretty useful since it will give a better understanding to the developer when an error happens:

e.g. Given the following definition:

then shown error will be similar to:

or

instead of

or

Definition of the Function used to replace the *invalid* found pattern

Definition of the function must be done as a string in 1 line, and the following rules apply:

• It must return a string value, if not, return value will be ignored, i.e. it will silently fail. • Its definition must be only the body of the function. • For "simple" functions where the return is found at the beginning of the body of the function and the exact word *return* is not present, return can be omitted. • If the function has invalid Javascript code, the function will be ignored, i.e. it will silently fail.

Function will receive 3 parameters, to be used as desired:

• text: a string with the value of the invalid text found. • captured: an array of strings with the values of the captured groups for the regex. • $: an array of strings, with the value of the invalid text found plus the values of the captured groups for the regex, i.e. • $[0] = text: a string with the value of the invalid text found. • $[1..] = captured: an array of strings with the values of the captured groups for the regex. • $[1] = captured[0] and so on. • It allows smaller definitions.

Using parameter text

e.g.

"return text.trim()" => only the body of the function + returns a string value based on text

Having the following rule in .eslintrc.json:

or using $:

then, given:

example.js

when linting with fix, the result will be:…

Description from the npm listing.

  • eslint-plugin-regex
  • eslint
  • regex-rule
  • regex
  • regexp
  • eslint-regex
  • eslint-rule
  • eslint-regex-rule
  • rule
  • expression
  • regular-expression
  • eslint-regular-expression
  • eslint-regular-expression-rule
  • eslintrule
  • regular-expression-rule
  • eslintplugin
  • eslint-plugin
  • plugin
  • coding style
  • coding standards

Where eslint-plugin-regex 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 28, #1 (overall #541)
All npm: every listing in weekly downloads order
PNG SVG
ESLint plugins252 listings · 13 pages · page 7, #8 (overall #128)
ESLint plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

eslint-plugin-regex weekly downloads on npm, last 90 days: 54,023 weekly downloads as of Oct 17, 2026, -59.0% over 90 days.eslint-plugin-regexWeekly downloads on npm · Last 90 days54,023downloads / week-59.0% over 90 days050K100K150K200KJul 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-regex weekly downloads on npm, last 90 days: 54,023 weekly downloads as of Oct 17, 2026, -59.0% over 90 days.
PNG SVG

7/30/90-day growth

eslint-plugin-regex weekly downloads growth on npm: -57.3% over 7 days, -59.8% over 30 days, -59.0% over 90 days.eslint-plugin-regexWeekly downloads growth on npm54,023downloads / week now7-day growth-72,465 weekly downloads-57.3%30-day growth-80,360 weekly downloads-59.8%90-day growth-77,847 weekly downloads-59.0%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
eslint-plugin-regex weekly downloads growth on npm: -57.3% over 7 days, -59.8% over 30 days, -59.0% over 90 days.
PNG SVG

Ranking history

eslint-plugin-regex npm ranking history: currently #541 (by weekly downloads).eslint-plugin-regexnpm ranking · by weekly downloads · Last 90 days#541current rank#539#540#541#542#543Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
eslint-plugin-regex npm ranking history: currently #541 (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-regex
Date (UTC)Weekly downloadsChange vs. previous
54,023-6.3K
60,284+298
59,986-29.9K
89,901-33.6K
123,4670
123,467-3.2K
126,653+165
126,488+1.4K
125,124-4.2K
129,288+2.5K
126,754+6.4K
120,390-27.4K
147,747-971
148,718—

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-regex. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.