0.1.3 • Published 2 years ago

@scalvert/stylelint-formatter-sonarqube v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@scalvert/stylelint-formatter-sonarqube

CI Build npm version License Dependabot Volta Managed Code Style: prettier

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