Skip to content
PluginStats

eslint-plugin-headers weekly downloads statistics

By robmisasi · npm · ESLint plugins

A flexible and `--fix`able rule for checking, inserting, and formatting file headers.

View on npm Fresh · Oct 16, 2026

eslint-plugin-headers has 38,982 recorded weekly downloads on npm.

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

PluginStats has 2 daily observations since Oct 12, 2026; the latest is from Oct 16, 2026.

Weekly downloads
38,982
Official API · Oct 16, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#609
Among tracked npm listings

About eslint-plugin-headers

eslint-plugin-headers

A flexible and --fixable rule for checking, inserting, and formatting file headers.

Supports variable content injection, regex pattern matching, configurable usage of block or line comments, custom comment block prefixes and suffixes, custom line prefixes, and spacing between the header and code.

Useful for inserting, enforcing, and updating copyright or licensing notices while preserving pragma expressions in leading content blocks.

This plugin is best used with a formatter like prettier.

Motivation

This plugin aims to be a successor to the popular but defunct plugin eslint-plugin-header. eslint-plugin-headers strives to implement the same features as eslint-plugin-header where possible, while sensibly extending features, supporting modern JavaScript frameworks, and maintaining compatibility with other common tools.

Installation

You'll first need to install ESLint:

Next, install eslint-plugin-headers:

Usage

Flat config

Import the default export from the estlin-plugin-headers module. Add the headers key to the plugins section of your config object in the configuration file. You can omit the eslint-plugin- prefix:

Then configure the rules you want to use under the rules section.

Legacy .eslintrc config

Add headers to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

Then configure the rules you want to use under the rules section.

Usage with Vue

This project supports parsing Vue files via the AST generated by the vue-eslint-parser package. To properly apply this plugin's rules to Vue files, you must:

1. Install the vue-eslint-parser package as a dev dependency. 2. Specify the vue-eslint-parser in the configuration's languageOptions.parser field (or the "parser" field for legacy configurations), and 3. Set the enableVueSupport flag for the appropriate rules.

Example configuration:

With this configuration the following file would be transformed like so:

Before:

After applying the fix:

Since the vue-eslint-parser package strives to maintain compatibility with rules targeting JavaScript, it exposes Vue AST tokens to rules in different ways than the default ESlint parser. The means of exposing HTML Comment nodes are of specific interest to this plugin, and the mechanism to access these are substantially different than how a plugin would typically read a comment node, making it necessary to both specify this particular parser as well as setting the flag.

Examples

Example 0:

Example Configuration:

Using the above configuration, here's a file without a matching header:

When the fix is applied, the file now appears so:

Example 1:

Using the same configuration, this file already has a header, this one containing pragmas:

When the fix is applied, the file now appears so:

Example 2: Using the following configuration, variable values can be injected into the provided header:

We can then apply a fix to the following file:

And get the resulting header:

Example 3:

Using the following configuration, patterns are used to validate content in existing headers:

The following file would validate successfully:

Alternatively, the plugin can apply a fix to the following invalid file:

And get the following header:

Options

Options are supplied through a single object with the following properties:

| Name | Type | Required | Default | Description |

| source | "file" \| "string" | Yes | | Indicates how the header content is supplied. | | style | "line" \| "jsdoc" | No | "jsdoc" | Indicates the comment style to enforce. A leading line-style comment block will only include adjacent line comments, although a line comment's content may be empty. No effect if enableVueSupport: true. | | content | string | When source: "string" | | The string to enforce in the header comment. | | path | string | When source: "file" | | The path to a file containing the header content to enforce. | | preservePragmas | boolean | No | true | Preserves existing pragma expressions in leading comments when updating header. No effect when style: "line". | | blockPrefix | string | No | See below | Content at the start of the leading comment block. | | blockSuffix | string | No | See below | Content at the end of the leading comment block. | | linePrefix | string | No | See below | Content prepended to the start of each line of content. | | trailingNewlines | number | No | | Number of empty lines to enforce after the leading comment. | | variables | object | No | | The keys to find and values to fill when formatting the provided header. Values must be strings. | | patterns | { [key: string] : { pattern: string; defaultValue?: string; } } | No | | The keys to find and Regex patterns to validate when matching the provided header. WARNING! Default values must be provided for errors to be --fixable. | | enableVueSupport | boolean | No | false | EXPERIMENTAL! Enable support for parsing .vue files. Must be used with vue-eslint-parser. See above for details. |

Default Prefixes and Suffixes

Example configuration:

The subsequent section titles contain the additional configuration inserted above, and the resulting comment that will be produced.

style: "line"

Expected/produced header:

• Default block prefix: None • Default block suffix: None • Default line prefix: " "

style: "jsdoc"

Expected/produced header:

• Default block prefix: "*\n" • Default block suffix: "\n " • Default line prefix: " * "

enableVueSupport: true

Expected/produced header:

• Default block prefix: "\n" • Default block suffix: "\n" • Default line prefix: " "

Future

• Add support for common pragma expressions that don't utilize the @ symbol (e.g. eslint-disable)

Rules

🔧 Automatically fixable by the --fix CLI option.

| Name | Description | 🔧 |

| header-format | Verifies the content and format of a file's leading comment block. | 🔧 |

Description from the npm listing.

  • eslint
  • eslintplugin
  • eslint-plugin
  • header
  • headers
  • license

Where eslint-plugin-headers 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 31, #9 (overall #609)
All npm: every listing in weekly downloads order
PNG SVG
ESLint plugins252 listings · 13 pages · page 8, #7 (overall #147)
ESLint plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

eslint-plugin-headers weekly downloads on npm, last 90 days: 38,982 weekly downloads as of Oct 16, 2026.eslint-plugin-headersWeekly downloads on npm · Last 90 days38,982downloads / week35K40K45K50K55K60K65KJul 18Aug 2Aug 17Sep 1Sep 16Oct 1Oct 16downloads / weekobservedarchived (Internet Archive)no observationsOct 12, 2026 – Oct 16, 2026 · 2 observations · Updated Oct…pluginstats.com
eslint-plugin-headers weekly downloads on npm, last 90 days: 38,982 weekly downloads as of Oct 16, 2026.
PNG SVG

7/30/90-day growth

eslint-plugin-headers weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.eslint-plugin-headersWeekly downloads growth on npm38,982downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 16, 2026pluginstats.com
eslint-plugin-headers weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.
PNG SVG

Ranking history

eslint-plugin-headers npm ranking history: currently #609 (by weekly downloads).eslint-plugin-headersnpm ranking · by weekly downloads · Last 90 days#609current rank#607#608#609#610#611Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 16, 2026pluginstats.com
eslint-plugin-headers npm ranking history: currently #609 (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 (2)
Recent weekly downloads observations for eslint-plugin-headers
Date (UTC)Weekly downloadsChange vs. previous
38,982-25.2K
64,171—

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