Skip to content

A stylelint plugin to enforce (and fix/update) a required header comment for license/copyright information.

License

Notifications You must be signed in to change notification settings

themoonrat/stylelint-license-header

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stylelint-license-header

A Stylelint plugin to enforce (and fix/update) a required header comment for license/copyright information in CSS files.

Install

Follow instructions for installation and setup of Stylelint.

Then install this plugin with yarn or npm:

yarn add --dev @themoonrat/stylelint-license-header
npm add --save-dev @themoonrat/stylelint-license-header

Setup

Set up in .stylelintrc:

{
  "plugins": [
    "@themoonrat/stylelint-license-header"
  ],
  "rules": {
    "license-header/license-header": [
	  true,
	  {
        "license": "Copyright 2020-2024 MyCompany Inc."
      }
    ]
  }
}

Pass a string into the license option. This string will be placed into a comment (/* yourStringHere */) and compared against the top of each linted file.

This plugin supports autofixing. When you pass the --fix option to Stylelint, the given license header will be added at the top of any files that are missing it.

About

A stylelint plugin to enforce (and fix/update) a required header comment for license/copyright information.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%