fis3-lint-rich-stylelint
v1.1.9
Published
a based stylelint plugin for fis3
Downloads
4
Readme
fis3-lint-rich-stylelint
- The fis3-lint-rich-stylelint library exported as a fis3 plugin.
Dependencies
Installation
$ npm install fis3-lint-rich-stylelint [--save-dev]
Usages
fis.match('*.js', {
lint: fis.plugin('rich-stylelint'[, options])
})
See the options what is same as stylelint lint for more details.
Default configs
{
'fix': false,
'allowOutfixed': false,
'code': fileText,
'formatter': 'string',
'useEslintrc': false,
'ignoreFiles': [
'bower_components/**',
'node_modules/**',
'lint-fixed/**'
],
'config': {
'rules': rules
}
}
allowOutfixed: Boolean | [Boolean, options]
Output the restored file to the directory '/lint-fixed/**', the premise is that the value of fix is true
options
'root': true
Get root permissions, it will modify the source file,this operation does't promise correctness, so be careful!!!'dirname': '/lint-fixed'
Specify the root directory of the repaired file output
ignoreFiles: [String]
Glob patterns for paths to ignore.
Rules
As mentioned above, the following is introduce of rules:
Stylelint-config-lagou
配置参考stylelint-config-lagou定义
Turning rules off from within your CSS
- turn all the rules off:
/* stylelint-disable */
a {}
/* stylelint-enable */
- turn off specified rules:
/* stylelint-disable selector-no-id, declaration-no-important */
#id {
color: pink !important;
}
/* stylelint-enable */
- turn off specified line and rules:
#id { /* stylelint-disable-line */
color: pink !important; /* stylelint-disable-line declaration-no-important */
}
#id {
/* stylelint-disable-next-line declaration-no-important */
color: pink !important;
}
- If you want to know more, please refer to stylelint turning rules off from CSS