npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-copyright

v1.2.1

Published

Ensure files have up-to-date copyright notices. Supports Typescript + ESLint flat config.

Readme

eslint-plugin-copyright

Are you tired of plugins that treat TypeScript like a second-class citizen? Or perhaps you're a stylish, modern best-practice 10x web developer embracing ESLint's flat config only to find your copyright plugin is stuck in 2023?

Worry not my weary friend for at last you've stumbled upon eslint-plugin-copyright - a plugin with types that actually work and first-class flat config support that won't make you question your life choices.

Because in 2026, your copyright plugin should be at least as modern as the javascript framework released last week which you've just adopted for a complete rewrite.

What's that I hear, your repository might be a little rusty? You're in luck! We even ship a tiny Rust parser whose sole life purpose is to ~~pass the butter~~, err I mean slap a copyright header on .rs files. Wasm is the future after all.

Features

  • Ensure copyright notices are the first line in files (no whitespace or other comments above)
  • Works with JavaScript, TypeScript, and CSS files by default using appropriate comment styles (// for JS/TS, /* */ for CSS)
  • Automatically updates copyright year to the current year when outdated
  • Configurable copyright text with year placeholder (YYYY)
  • Configurable file globs via ESLint config (recommended)
  • Configurable number of newlines after the copyright comment
  • Detects and auto-fixes duplicate copyright notices at the top of files
  • Compatible with both ESLint flat config and traditional config formats
  • Built with TypeScript for full type definitions
  • Includes a barebones Rust parser to add/fix copyright notices in .rs files

Installation

# Using pnpm
pnpm add -D eslint-plugin-copyright

# Or if your taste is more questionable...

# Using npm
npm install eslint-plugin-copyright --save-dev

# Using yarn
yarn add eslint-plugin-copyright --dev

Usage

Configuration Options

| Option | Type | Required | Default | Description | | ------------ | -------- | -------- | -------------------- | ------------------------------------------------------------------------------------------------- | | template | string | Yes | 'Copyright © YYYY' | The copyright text template. Use YYYY as a placeholder for the current year. | | newlines | number | No | 2 | Number of newlines to append after the copyright comment. | | extensions | string[] | No | — | Optional allow-list of extensions to check (without leading dot). Prefer files globs in config. |

ESLint Flat Config (recommended)

// eslint.config.ts
import copyright, { rustParser } from 'eslint-plugin-copyright';
import css from '@eslint/css';

export default [
  {
    // Prefer ESLint's file globs over per-rule extension filtering
    files: ['**/*.{js,jsx,ts,tsx,d.ts}'],
    plugins: {
      copyright,
    },
    rules: {
      'copyright/notice': [
        'error',
        {
          template: 'Copyright © YYYY YetAnotherAI, Inc. All rights reserved.',
          newlines: 2,
        },
      ],
    },
  },
  {
    files: ['**/*.css'],
    plugins: { css, copyright },
    language: 'css/css',
    rules: {
      'copyright/notice': [
        'error',
        { template: 'Copyright © YYYY YetAnotherAI, Inc. All rights reserved.', newlines: 1 },
      ],
    },
  },
  {
    files: ['**/*.rs'],
    plugins: { copyright },
    // This parser exists only to make header checking/fixing work on Rust files.
    // It does not lint Rust semantics.
    languageOptions: { parser: rustParser },
    rules: {
      'copyright/notice': [
        'error',
        { template: 'Copyright © YYYY YetAnotherAI, Inc. All rights reserved.', newlines: 2 },
      ],
    },
  },
];

Legacy ESLint Config

// .eslintrc.js
module.exports = {
  plugins: ['copyright'],
  overrides: [
    {
      files: ['**/*.{js,jsx,ts,tsx,d.ts}'],
      rules: {
        'copyright/notice': [
          'error',
          { template: 'Copyright © YYYY InvestInMyAI LLC. All rights reserved.', newlines: 2 },
        ],
      },
    },
  ],
};

License

MIT