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

eslint-plugin-file-header

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-file-header

Rule to check if file contains specified comment

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
78
decreased by-66.81%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-file-header

Rule to check if file contains specified comment.

Installation

yarn add -D eslint-plugin-file-header
Example:
module.exports = {
  plugins: ["file-header"],
  rules: {
    "file-header/file-header": [
      "error",
      [
        "This Source Code Form is subject to the terms of the Mozilla Public",
        "License, v. 2.0. If a copy of the MPL was not distributed with this",
        "file, You can obtain one at <http://mozilla.org/MPL/2.0/>."
      ],
      "block",
      ["-\\*-(.*)-\\*-", "eslint(.*)", "vim(.*)"]
    ]
  }
};
Options:
  1. header - array of text lines (without comment tags).
  2. commentType - either block, line or null. Plugin will use this option to search for headers and to fix missing header.
  3. ignoredComments - array of patterns that this rule will ignore (they won't be replaced by the rule and new header will be inserted after last ignoredComment if any).
Hardcoded rules:
  • Header must not be intended.
  • Header must start in 6 first lines of file.

FAQs

Package last updated on 14 Apr 2018

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