2.0.0 • Published 5 years ago

@appius-digital/task-lint-styles v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Appius Build Tool: Lint Styles

Use this tool to verify the quality of CSS and SCSS as part of your build process.

Installation

Run the following command from your project root.

npm install @appius-digital/task-lint-styles --save

Usage

Add the following to your gulpfile.js

require('@appius-digital/task-lint-styles')(gulp, {
  task: 'lint-styles',
  src: ['src/**/*.scss'] });

Options

NameTypeRequiredDefaultDescription
taskStringNo'lint-styles'The name of the task to be initialised
srcArrayYesThe globs to be processed
optionsObjectNoA set of sass-lint options
ignoreArrayNo['**/vendor/**/*.*']A glob pattern to be ignored
rulesObjectNoSee belowA set of sass-lint rules

Configuration

Set the rules to be applied and their severity using the standard sass-lint configuration format. Note that the rules are set as a whole, so when overwriting the defaults you should always provide a complete configuration.

Default Rules

The defaults are designed to be relatively forgiving by disabling some lower-priority rules, but may be changed at any time in future versions as standards evolve.

rules: {
  'hex-length': 0,
  'zero-unit': 0,
  'property-sort-order': 0,
  'single-line-per-selector': 0
}

Copyright and license

Code and documentation Copyright 2018 Appius. Code released under the MIT License.