Conversation
graywolf336
left a comment
There was a problem hiding this comment.
My reason for disagreeing with this one is because we are an Open Source project and often times the first time people contribute to an open source project is to our repository. Thus, I strongly feel that we should have coding style rules that make it easier for new developers to understand what is going on.
.eslintrc
Outdated
| "no-void": 2, | ||
| "no-var": 2, | ||
| "no-multiple-empty-lines": [2, { "max": 2 }], | ||
| "arrow-parens": [2, "as-needed", { "requireForBlockBody": true }], |
There was a problem hiding this comment.
I disagree with this and I think it should be always.
d9b122e to
e5d42b9
Compare
|
guys, I've added a new rule no-mixed-operators based on airbnb the pull request is ready to be reviewed.. I recommend looking at particularly commits, since most of the fixes were by |
# Conflicts: # .eslintrc # packages/chatpal-search/server/provider/provider.js # packages/meteor-accounts-saml/saml_rocketchat.js # packages/rocketchat-api/server/v1/im.js # packages/rocketchat-api/server/v1/users.js # packages/rocketchat-authorization/server/models/Roles.js # packages/rocketchat-channel-settings/server/functions/saveRoomType.js # packages/rocketchat-custom-oauth/server/custom_oauth_server.js # packages/rocketchat-emoji/client/lib/EmojiPicker.js # packages/rocketchat-file-upload/server/lib/FileUpload.js # packages/rocketchat-integrations/server/lib/triggerHandler.js # packages/rocketchat-ldap/client/loginHelper.js # packages/rocketchat-ldap/server/sync.js # packages/rocketchat-lib/server/functions/saveUser.js # packages/rocketchat-lib/server/lib/debug.js # packages/rocketchat-lib/server/methods/sendInvitationEmail.js # packages/rocketchat-lib/server/models/_Base.js # packages/rocketchat-lib/server/startup/settings.js # packages/rocketchat-mailer/server/functions/sendMail.js # packages/rocketchat-nrr/nrr.js # packages/rocketchat-push-notifications/client/views/pushNotificationsFlexTab.js # packages/rocketchat-sandstorm/server/powerbox.js # packages/rocketchat-search/server/index.js # packages/rocketchat-setup-wizard/client/setupWizard.js # packages/rocketchat-ui-admin/client/adminInfo.js # packages/rocketchat-ui-flextab/client/tabs/membersList.js # packages/rocketchat-ui-flextab/client/tabs/uploadedFilesList.js # packages/rocketchat-ui-flextab/client/tabs/userInfo.js # packages/rocketchat-ui-message/client/message.js # packages/rocketchat-ui-message/client/messageBox.js # packages/rocketchat-webrtc/client/WebRTCClass.js # server/configuration/accounts_meld.js # server/lib/accounts.js # tests/end-to-end/api/01-users.js # tests/end-to-end/ui/13-permissions.js
|
|
||
| subject = RocketChat.placeholders.replace(subject); | ||
| html = RocketChat.placeholders.replace(html, { | ||
| name: s.escapeHTML(userData.name), |
| encoding = 'base64'; | ||
| image = fileData.image; | ||
| contentType = fileData.contentType; | ||
| ({ image } = fileData); |
There was a problem hiding this comment.
Do we need parenthesis in these cases?
|
closing this in favor of #11804 |
I'm proposing adding this bunch of new eslint rules to better standardize our code base and also making PR reviews a bit easier (since we don't need to care about much of code styling).
Since this is still a proposition, I'm not worried of fixing the issues. I have fixed most of them using
--fix, but some need manual fix which I'm willing to do since we all approve the new rules.For easy reviewing, I'm proposing adding the following rules:
{ "max": 2 }"always""as-needed"{"object": true, "array": false}"as-needed""never""always""never"to"always-multiline"@RocketChat/core please evaluate.