Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid json for max warnings option #5267

Merged
merged 2 commits into from May 1, 2021
Merged

Fix invalid json for max warnings option #5267

merged 2 commits into from May 1, 2021

Commits on Apr 30, 2021

  1. Output max warnings message to STDERR

    I think stylelint should output any error or warning messages to STDERR instead of STDOUT.
    Because users should expect that *piping* is available.
    
    For example, here is an example of using the `jq` command:
    
    ```console
    $ stylelint --formatter=json --max-warnings=0 a.css | jq .
    
    Max warnings exceeded: 1 found. 0 allowed
    
    [
      {
        "source": "/tmp/a.css",
        "deprecations": [],
        "invalidOptionWarnings": [],
        "parseErrors": [],
        "errored": false,
        "warnings": [
          {
            "line": 1,
            "column": 2,
            "rule": "block-no-empty",
            "severity": "warning",
            "text": "Unexpected empty block (block-no-empty)"
          }
        ]
      }
    ]
    ```
    ybiquitous authored and jeddy3 committed Apr 30, 2021
    Copy the full SHA
    d00ca49 View commit details
    Browse the repository at this point in the history
  2. Use fixturesPath()

    ybiquitous authored and jeddy3 committed Apr 30, 2021
    Copy the full SHA
    258fa1c View commit details
    Browse the repository at this point in the history