Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-header

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-header

ESLint plugin to ensure that files begin with given comment

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
312K
decreased by-5.08%
Maintainers
1
Weekly downloads
 
Created

What is eslint-plugin-header?

The eslint-plugin-header package is an ESLint plugin that allows you to enforce consistent header comments in your JavaScript files. This can be useful for ensuring that all files in a project contain specific licensing information, author details, or any other required header content.

What are eslint-plugin-header's main functionalities?

Enforce Header Comments

This feature allows you to enforce a specific header comment at the top of your JavaScript files. The configuration specifies the type of comment (block in this case) and the content of the header.

module.exports = {
  "plugins": ["header"],
  "rules": {
    "header/header": [2, "block", [
      "*",
      " This is a header comment",
      " Author: Your Name",
      " License: MIT",
      "*/"
    ]]
  }
};

Customizable Header Content

You can customize the content of the header to include project-specific information such as the project name, author, and date. This ensures that all files have consistent and up-to-date header information.

module.exports = {
  "plugins": ["header"],
  "rules": {
    "header/header": [2, "block", [
      "*",
      " Project: My Project",
      " Author: Your Name",
      " Date: 2023-10-01",
      "*/"
    ]]
  }
};

Support for Different Comment Styles

The plugin supports different styles of comments, such as line comments. This allows you to choose the comment style that best fits your project's coding standards.

module.exports = {
  "plugins": ["header"],
  "rules": {
    "header/header": [2, "line", [
      "// This is a header comment",
      "// Author: Your Name",
      "// License: MIT"
    ]]
  }
};

Other packages similar to eslint-plugin-header

Keywords

FAQs

Package last updated on 03 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc