Name: danger-plugin-no-console
Owner: Spectrum
Description: DangerJS plugin to prevent merging any code that contains console log statements
Created: 2018-03-14 09:21:03.0
Updated: 2018-05-01 05:15:09.0
Pushed: 2018-03-19 10:59:35.0
Homepage: null
Size: 152
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Danger plugin to prevent merging code that still has
console.log
s inside it.
Install:
add danger-plugin-no-console --dev
At a glance:
angerfile.js
rt { schedule } from 'danger'
rt noConsole from 'danger-plugin-no-console'
ote: You need to use schedule()
dule(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:
angerfile.js
rt noConsole from 'danger-plugin-no-console'
ny file that contains console.log or console.info will fail,
ut files can contain console.error and console.warn
dule(noConsole({ whitelist: ['error', 'warn'] }))
See the GitHub release history.
See CONTRIBUTING.md.