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

@fbartho/danger-plugin-eslint

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fbartho/danger-plugin-eslint

Eslint your code with Danger

  • 1.1.0-beta.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

danger-plugin-eslint

Build Status npm version semantic-release

Eslint your code with Danger

Usage

Install:

yarn add danger-plugin-eslint --dev

At a glance:

// dangerfile.js
import eslint from "danger-plugin-eslint";

eslint();

This fork of danger-plugin-eslint automatically comments inline on linter violations.

Slightly more advanced users may be interested in providing the PluginOptions. Among other things, this allows you to inject your own logic to be run for every lint message.

Some use cases include:

  • customizing the formatting of the lint-error-message (since this comments inline in your source, this might be useful!)
  • building your own workflow where PRs shouldn't always fail due to the lint errors if the PR is labeled: WIP, for example!
eslint(undefined, {
  onLintMessage: ({ filePath, line, hasFixesOrSuggestions, linterMessage, formattedMessage, suggestedReporter }) => {
    if (prIsWIP() && suggestedReporter === error) {
      warn(formattedMessage, filePath, line);
    } else {
      suggestedReporter(formattedMessage, filePath, line);
    }
  },
});

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Keywords

FAQs

Package last updated on 13 Jul 2020

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