Socket
Socket
Sign inDemoInstall

danger-plugin-no-console-ext

Package Overview
Dependencies
145
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    danger-plugin-no-console-ext

Danger plugin to prevent merging code that still has `console.log`s inside it.


Version published
Weekly downloads
570
increased by70.66%
Maintainers
1
Install size
18.4 MB
Created
Weekly downloads
 

Readme

Source

danger-plugin-no-console

Build Status npm version semantic-release

Danger plugin to prevent merging code that still has console.logs inside it.

Usage

Install:

yarn add danger-plugin-no-console-ext --dev

At a glance:

// dangerfile.js
import { schedule } from 'danger'
import noConsole from 'danger-plugin-no-console-ext'

// Note: You need to use schedule()
schedule(noConsole())

Output example

Fails
⛔️

1 console statement(s) left in src/add.js.

Options

whitelist

You can specify a whitelist of console properties to let pass. This is useful to e.g. let errors be logged, like so:

// dangerfile.js
import noConsole from 'danger-plugin-no-console'

// Any file that contains console.log or console.info will fail,
// but files can contain console.error and console.warn
schedule(noConsole({ whitelist: ['error', 'warn'] }))

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Keywords

FAQs

Last updated on 11 Feb 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc