stylelint-formatter-simplest
v1.0.0
Published
A stylelint formatter to just identify whether there's any warnings or not
Downloads
13
Maintainers
Readme
stylelint-formatter-simplest
A stylelint formatter to just identify whether there's any warnings or not
Installation
npm install stylelint-formatter-simplest
API
const stylelintFormatterSimplest = require('stylelint-formatter-simplest');
stylelintFormatterSimplest(stylelintResults)
stylelintResults: Array<Object>
Return: string
('!'
or ''
)
When at least one of the stylelint results is not ignored and has either non-empty warnings
or invalidOptionWarnings
, it returns a single character !
. Otherwise it returns an empty string.
stylelintFormatterSimplest([{
source: '/Users/shinnn/fixture.css',
deprecations: [],
invalidOptionWarnings: [],
parseErrors: [],
errored: true,
warnings: [{
line: 1,
column: 2,
rule: 'block-no-empty',
severity: 'error',
text: 'Unexpected empty block (block-no-empty)'
}],
ignored: false
}]); //=> '!'
stylelintFormatterSimplest([{
source: '/Users/shinnn/another-fixture.css',
deprecations: [],
invalidOptionWarnings: [],
parseErrors: [],
errored: false,
warnings: [],
ignored: false
}]); //=> ''
License
ISC License © 2018 Shinnosuke Watanabe