@scalvert/stylelint-formatter-sonarqube
v0.1.3
Published
A Stylelint formatter to output JSON in a format compatible with SonarQube external analyzer format
Downloads
5
Maintainers
Readme
@scalvert/stylelint-formatter-sonarqube
A custom formatter for
stylelint
that will format the output in SonarQube's generic issue format.
Install
npm i @scalvert/stylelint-formatter-sonarqube --save-dev
# or
yarn add @scalvert/stylelint-formatter-sonarqube --dev
Output will be in 'Generic Issue Format'.
{
"issues": [
{
"engineId": "stylelint",
"ruleId": "property-no-unknown",
"primaryLocation": {
"message": "Unexpected unknown property \"foo\" (property-no-unknown)",
"filePath": "foo.css",
"textRange": {
"startLine": 1,
"startColumn": 17,
"endLine": 1,
"endColumn": 17
}
}
},
{
"engineId": "stylelint",
"ruleId": "block-no-empty",
"primaryLocation": {
"message": "Unexpected empty block (block-no-empty)",
"filePath": "sub/bar.css",
"textRange": {
"startLine": 1,
"startColumn": 5,
"endLine": 1,
"endColumn": 5
}
}
}
]
}
Usage
stylelint "**/*.css" --custom-formater node_modules/@scalvert/stylelint-formatter-sonarqube