stylelint-junit-formatter2
Output JUnit XML reports of stylelint results (that can be parsed by CircleCI or Bamboo).
Usage
With the Stylelint Node API:
const fs = ;const stylelint = ;const junitFormatter = ; const stylelintOptions = files: '**/*.css' formatter: ; stylelint ;
…or read the stylelint documentation about using formatters and follow those instructions.
The formatter will generate a .xml
-report with the following look:
In the event of errors, those are presented in a way that Bamboo can interpret:
On line 7, column 3 in /path/to/css/file.css On line 8, column 3 in /path/to/css/file.css
It can hide the passed files and the file path:
On line 7, column 3 in file.css On line 8, column 3 in file.css
And it can write the results into a file.