@appius-digital/task-lint-styles
v2.0.0
Published
Use this tool to verify the quality of CSS and SCSS as part of your build process.
Downloads
7
Readme
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
| Name | Type | Required | Default | Description |
| --------- | ---------- | ----------- | ---------------------- | -------------------------------------- |
| task | String | No | 'lint-styles' | The name of the task to be initialised |
| src | Array | Yes | | The globs to be processed |
| options | Object | No | | A set of sass-lint options |
| ignore | Array | No | ['**/vendor/**/*.*']
| A glob pattern to be ignored |
| rules | Object | No | See below | A 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.