danger / JavaScript

danger-plugin-no-console

danger-plugin-no-console

danger / JavaScriptMarch 14, 2018 · 10:10am
I wrote my first DangerJS plugin 😍 http://github.com/withspectrum/danger-plugin-no-console
It will fail the build if you leave a console statement anywhere in your modified or added files. Code sample:
import { schedule } from 'danger' import noConsole from 'danger-plugin-no-console' schedule(noConsole()))
This is what the output looks like:

Hope you like it!
withspectrum/danger-plugin-no-console
https://github.com/withspectrum/danger-plugin-no-console

March 14, 2018 · 5:21pm

Posted on twitter, but also reposting here. Why are you using danger for this instead of compress.drop_console in uglify? (https://github.com/mishoo/UglifyJS2/tree/harmony#compress-options)

Also, this is a fantastic example of danger and I've been avoiding looking into it but now I have. thanks :D

  • reply
  • like

Honestly we should just be using eslint 😂

  • reply
  • like

I wanted to see how hard it would he to write a plugin mostly

  • reply
  • like
  • reply
  • like
Your message here...

*bold*_italic_`code````codeblock```