Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

danger-plugin-no-console-ext

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

danger-plugin-no-console-ext

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

    1.2.2latest

Version published
Maintainers
1
Yearly downloads
6,536
increased by6.78%

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

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc