A custom formatter for stylelint that outputs lint results in SARIF (Static Analysis Results Interchange Format). Current version 1.0.7. This package has no release cadence as it is a small utility. Key differentiator: enables integration with SARIF-compatible tools like GitHub Advanced Security and Microsoft SARIF viewers, unlike built-in stylelint formatters which output JSON or verbose text.
npm install stylelint-sarif-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to run stylelint with the SARIF formatter via command line or programmatically using child_process.
Use --custom-formatter=./node_modules/stylelint-sarif-formatter or full path.
Use stylelint ... --custom-formatter=... > output.sarif
Upgrade stylelint to at least 14.0.0.
Name the output file with .sarif extension.
Run `yarn add stylelint-sarif-formatter` or `npm install stylelint-sarif-formatter` and use correct path: `--custom-formatter=./node_modules/stylelint-sarif-formatter`.
Use default import: `import formatter from 'stylelint-sarif-formatter'` or `const formatter = require('stylelint-sarif-formatter')`.Upgrade stylelint to version 14 or later.