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

eslint-plugin-headers has 118,465 recorded weekly downloads on npm, an increase of 22.7% over the past 30 days, ranking #615 of 3,247 tracked listings.

Weekly downloads
118,465
Official API · Dec 5, 2026
7-day growth
+27.2%
+25.3K weekly downloads
30-day growth
+22.7%
+21.9K weekly downloads
90-day growth
+46.2%
+37.4K weekly downloads
Rank
#615
▲ 19 in 7 days

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:

npm i eslint --save-dev

Next, install eslint-plugin-headers:

npm install eslint-plugin-headers --save-dev

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:

import headers from "eslint-plugin-headers";

export default [
  {
    plugins: {
      headers,
    },
  },
];

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

import headers from "eslint-plugin-headers";

export default [
  {
    plugins: {
      headers,
    },
    rules: {
      "headers/header-format": [
        "error",
        {
          source: "string",
          content: "Copyright 2024. All rights reserved.",
        },
      ],
    },
  },
];
Legacy .eslintrc config

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

{
  "plugins": ["headers"]
}

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

{
  "rules": {
    "headers/header-format": [
      "error",
      {
        "source": "string",
        "content": "Copyright 2024. All rights reserved."
      }
    ]
  }
}
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:

import headers from "eslint-plugin-headers";
import vueEslintParser from "vue-eslint-parser";

export default [
  {
    plugins: {
      headers,
    },
    files: ["**/*.vue"],
    rules: {
      "headers/header-format": [
        "error",
        {
          source: "string",
          content: "This is a header.",
          enableVueSupport: true,
        },
      ],
    },
    languageOptions: {
      parser: vueEslintParser,
    },
  },
];

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

Before:

<template>
  <p>This is an example Vue file.</p>
</template>

After applying the fix:

<!--
  This is a header.
-->
<template>
  <p>This is an example Vue file.</p>
</template>

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:

{
  "rules": {
    "headers/header-format": [
      "error",
      {
        "source": "string",
        "content": "Copyright 2024. All rights reserved."
      }
    ]
  }
}

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

module.exports = 42;

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

/**
 * Copyright 2024. All rights reserved.
 */
module.exports = 42;

Example 1:

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

/**
 * @fileoverview This file contains a magic number.
 * @author Rob Misasi
 */
module.exports = 42;

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

/**
 * Copyright 2024. All rights reserved.
 *
 * @fileoverview This file contains a magic number.
 * @author Rob Misasi
 */
module.exports = 42;

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

{
  "rules": {
    "headers/header-format": [
      "error",
      {
        "source": "string",
        "content": "Copyright {year} {company}. All rights reserved.",
        "variables": {
          "year": "2077",
          "company": "Software Incorporated"
        }
      }
    ]
  }
}

We can then apply a fix to the following file:

/**
 * Copyright 1947 Hardware LLC. All rights reserved.
 */
module.exports = 42;

And get the resulting header:

/**
 * Copyright 2077 Software Incorporated. All rights reserved.
 */
module.exports = 42;

Example 3:

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

Description from the npm listing.

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

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-headers weekly downloads on npm, last 90 days: 118,465 weekly downloads as of Dec 5, 2026, +46.2% over 90 days.eslint-plugin-headersWeekly downloads on npm · Last 90 days118,465downloads / week+46.2% over 90 days020K40K60K80K100K120KSep 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-headers weekly downloads on npm, last 90 days: 118,465 weekly downloads as of Dec 5, 2026, +46.2% over 90 days.

7/30/90-day growth

eslint-plugin-headers weekly downloads growth on npm: +27.2% over 7 days, +22.7% over 30 days, +46.2% over 90 days.eslint-plugin-headersWeekly downloads growth on npm118,465downloads / week now7-day growth+25,334 weekly downloads+27.2%30-day growth+21,923 weekly downloads+22.7%90-day growth+37,431 weekly downloads+46.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-headers weekly downloads growth on npm: +27.2% over 7 days, +22.7% over 30 days, +46.2% over 90 days.

Ranking history

eslint-plugin-headers npm ranking history: currently #615 (by weekly downloads).eslint-plugin-headersnpm ranking · by weekly downloads · Last 90 days#615current rank#600#610#620#630#640#650Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-headers npm ranking history: currently #615 (by weekly downloads).

Listing placement

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

Listing placement

ESLint plugins290 listings · 15 pages · page 8, #7 (overall #147)
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 (157)
Recent weekly downloads observations for eslint-plugin-headers
Date (UTC)Weekly downloadsChange vs. previous
118,465+674
117,791+7.5K
110,270+6.3K
104,000+4.1K
99,887+3.9K
95,989+1.5K
94,475+1.3K
93,131-187
93,318-3.2K
96,512-6.9K
103,428-5.6K
109,056-1.4K
110,458+481
109,977—

Similar npm ESLint plugins plugins

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