-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up tests #1482
Clean up tests #1482
Conversation
bin/marked
Outdated
@@ -13,7 +13,7 @@ var fs = require('fs'), | |||
* Man Page | |||
*/ | |||
|
|||
function help() { | |||
function help () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured it should be consistant and since we are using standard might as well use their recommendation.
I personally don't care one way or the other but they were inconsistent before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should have the fewest changes possible (preferably none) to lib/marked.js
and bin/marked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the philosophical question "why?" I think the argument is that is makes visual grepping easier.
help()
= calling a help function
help ()
= defining a help function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I did pick the least changes. Making it consistent would have changed it either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My brain takes issue with this. Which standard/style/recommendation is this from (sorry, might have missed a mention somewhere)?
I haven't seen a language or style that adds a space between the name and the argument list container. Mainly just curious because it seems like it might add confusion not reduce it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I did pick the least changes
This is changing every single function. This is not necessary. We should make the tools follow the standards of the project, not conform to someone else's standard (unless there is clear value added).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standard js (which we have been using with eslint) has space-before-function-paren eslint rule set to "always". We had that rule turned off which made our code inconsistant.
This PR removes standard
from eslint since it doesn't allow us to catch es6 syntax in eslint but I added all of standard's rules to keep it consistant.
I changed it to never allow a space between a function and parens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link.
eslint/eslint#11658 is the reason I removed |
@joshbruce this should be ready to merge |
@UziTech - Confilicts. Sorry - probably should have merged this first. |
@joshbruce I fixed the conflicts |
Clean up tests
Marked version: master
Description
.md
and.html
files for original and new)gfm_
andcm_
tests from newnpm run test:update
to update CommonMark and GFM specsstandard
from eslint config for marked.js to disallow const and template strings for older versions of node and browsersContributor
Committer
In most cases, this should be a different person than the contributor.