1.0.1 • Published 7 years ago

stylelint-mocha-formatter v1.0.1

Weekly downloads
238
License
MIT
Repository
github
Last release
7 years ago

Stylelint-mocha-formatter

Create json compatible with mocha reports format.

Installation

    npm install --save-dev stylelint-mocha-formatter

Usage

In your stylelint config:

    var stylelintFormatter = require('stylelint-mocha-formatter');

    var stylelintConfig = {        
        reporters: [
            {
                formatter: stylelintFormatter,            
            },
        ]
    }

Output example:

{
    "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
        },
    ...