Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRules inconsistency: function declaration and function invocation, with or without space between function name and `(` #379
Comments
dcousens
changed the title
Rules inconstancy: function declaration and function invocation, with or without space between function name and `(`
Rules inconsistency: function declaration and function invocation, with or without space between function name and `(`
Jan 11, 2016
This comment has been minimized.
This comment has been minimized.
|
Related: #318 Please read i-disagree-with-rule-x-can-you-change-it. |
dcousens
closed this
Jan 11, 2016
dcousens
added
the
i disagree
label
Jan 11, 2016
This comment has been minimized.
This comment has been minimized.
|
And related to #89 |
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
xieranmaya commentedJan 11, 2016
Function declaration:
Function invocation:
I think it's and inconstancy and the above one do not need SO MUCH spaces and JSbeautifier removes the space between fn name and the
(, thus large amount old code do not follow the Standard.Most popular frameworks/libraries also do not reverse the space between function name and the
(, like Angular, Lodash and React:Angular: https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L26
Lodash: https://github.com/lodash/lodash/blob/master/lodash.js#L381
React: https://github.com/facebook/react/blob/master/src/isomorphic/classic/element/ReactElement.js#L114
Chrome DevTools also format it without spaces:
