Danger plugin to prevent merging code that still has `console.log`s inside it.
npm install danger-plugin-no-console


> Danger plugin to prevent merging code that still has console.logs inside it.
Install:
``sh`
yarn add danger-plugin-no-console --dev
At a glance:
`js
// dangerfile.js
import { schedule } from 'danger'
import noConsole from 'danger-plugin-no-console'
// Note: You need to use schedule()
schedule(noConsole())
`
| Fails | |
|---|---|
| ⛔️ | 1 console statement(s) left in src/add.js. |
#### whitelist
You can specify a whitelist of console properties to let pass. This is useful to e.g. let errors be logged, like so:
`js
// 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'] }))
``
See the GitHub release history.
See CONTRIBUTING.md.