1.0.2 • Published 4 years ago

stylelint-license-header v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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 stylelint-license-header
npm add --save-dev stylelint-license-header

Setup

Set up in .stylelintrc:

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

Pass a string into the license option. This string will be placed into a comment (/* yourStringHere */) and compared against the first comment 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. If there is already a comment at the top of the file, the license header comment will replace it.

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago