https://github.com/hhru/stylelint-mocha-formatter
Mocha formatter for Stylelint
https://github.com/hhru/stylelint-mocha-formatter
frontend-tools
Last synced: about 2 months ago
JSON representation
Mocha formatter for Stylelint
- Host: GitHub
- URL: https://github.com/hhru/stylelint-mocha-formatter
- Owner: hhru
- Created: 2016-11-28T08:13:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T19:46:23.000Z (over 2 years ago)
- Last Synced: 2024-04-14T07:22:20.089Z (about 1 year ago)
- Topics: frontend-tools
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 74
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
## Stylelint-mocha-formatter
Create json compatible with mocha reports format.
### Installation
```javascript
npm install --save-dev stylelint-mocha-formatter
```### Usage
In your stylelint config:
```javascript
var stylelintFormatter = require('stylelint-mocha-formatter');var stylelintConfig = {
reporters: [
{
formatter: stylelintFormatter,
},
]
}
```### Output example:
```json
{
"stats": {
"suites": 119,
"tests": 119,
"passes": 117,
"pending": 0,
"failures": 2,
"start": "2016-11-25T17:22:38.866Z",
"end": "2016-11-25T17:22:38.866Z",
"duration": 0
},
"failures": [
{
"title": "path/to/app/global/mainPage-styles.less",
"fullTitle": "path/to/app/global/mainPage-styles.less",
"duration": 0,
"error": "Expected no more than 1 empty line(s) (max-empty-lines) 35:1"
}
{
"title": "path/to/app/global/mainPage-styles.less",
"fullTitle": "path/to/app/global/mainPage-styles.less",
"duration": 0,
"error": "Expected no more than 1 empty line(s) (max-empty-lines) 43:1"
}
],
"passes": [
{
"title": "path/to/app/global/app-styles.less",
"fullTitle": "path/to/app/global/app-styles.less",
"duration": 0
},
...
```