Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/eslint-formatter-sarif

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/eslint-formatter-sarif

ESLint formatter for the SARIF (Static Analysis Results Interchange Format) v2.1.0 file format

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
86K
increased by14.98%
Maintainers
5
Weekly downloads
 
Created
Source

SARIF formatter for ESLint

eslint-formatter-sarif is a formatter for ESLint that produces output in the SARIF (Static Analysis Results Interchange Format) v2.1.0 format.

It is available as an npm module @microsoft/eslint-formatter-sarif.

Installation and usage

  1. To install ESLint, follow the instructions at Getting Started with ESLint.

  2. To install the ESLint SARIF formatter:

    npm install @microsoft/eslint-formatter-sarif --save-dev
    
  3. To run ESLint with the SARIF formatter:

    ./node-modules/.bin/eslint -f @microsoft/eslint-formatter-sarif -o yourfile.sarif yourfile.js
    

Note that you cannot use the abbreviated form -f sarif, because that only works when the npm module name is of the form eslint-formatter-example, and the ESLint SARIF formatter module is not eslint-formatter-sarif; it's @microsoft/eslint-formatter-sarif. Alternatively, you can use the form -f @microsoft/sarif.

Developer details

To embed the contents of the analyzed source files in the resulting SARIF file:

set SARIF_ESLINT_EMBED=true

To disable content embedding:

set SARIF_ESLINT_EMBED=

To run unit tests:

RunTests.cmd

Keywords

FAQs

Package last updated on 12 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc