dcsan / gitterbot

GitterBot / gitter chatbot with Wiki integration, and more!
https://gitter.im/dcsan/gitterbot
61 stars 83 forks source link

Prepend chat room channel name #175

Closed abhisekp closed 9 years ago

abhisekp commented 9 years ago

Refactors and prepend channel names to room names.

Close #148 and close #153

cc: @dcsan

abhisekp commented 9 years ago

@dcsan please look into this and merge if this adheres to the requirements you asked.

I've flattened the chat room lists in a single variable.

dcsan commented 9 years ago

I think this looks good, but your linter settings are different to mine on space before paren on func name - so the whole code looks different. in general that's bad "PR etiquette" as i have to now check every function signature...

abhisekp commented 9 years ago

@dcsan the default is "space-before-function-paren": [0, "always"] i.e. don't show any error if there is a space between function and parenthesis for both named and anonymous functions. Moreover, a linter is not responsible for formatting. One must use js-beautify for taking care of the source formatting. It was not in the repo. So I had proposed one and you've already merged it. You've already merged a .jsbeautifyrc file in https://github.com/dcsan/gitterbot/blob/master/nap/.jsbeautifyrc Repo .eslintrc: https://github.com/dcsan/gitterbot/blob/master/nap/.eslintrc Default .eslintrc: https://github.com/eslint/eslint/blob/master/conf/eslint.json#L171 About the rule: http://eslint.org/docs/rules/space-before-function-paren

abhisekp commented 9 years ago

@dcsan though the issue is, In the .jsbeautifyrc file, the statement "space_after_anon_function": false clearly mentions not to keep any spaces between the function keyword and parenthesis in anonymous functions. See: https://github.com/dcsan/gitterbot/blob/master/nap/.jsbeautifyrc#L10

abhisekp commented 9 years ago

City chat room needs to be removed. And source code needs to be formatted to it's default format.

abhisekp commented 9 years ago

This PR is redundant after removal of city rooms and merging #190