eslint: Add and enforce space-in-parens lint rule.

This commit is contained in:
Tim Abbott 2017-10-06 12:36:39 -07:00
parent 0c44310009
commit 82b708b721
15 changed files with 28 additions and 27 deletions

View File

@ -310,7 +310,7 @@
"asyncArrow": "always" "asyncArrow": "always"
} }
], ],
"space-in-parens": 0, "space-in-parens": 2,
"space-infix-ops": 0, "space-infix-ops": 0,
"spaced-comment": 0, "spaced-comment": 0,
"strict": 0, "strict": 0,

View File

@ -70,7 +70,8 @@ exports.initialize = function () {
}, },
success: function () { success: function () {
$('#submit-invitation').button('reset'); $('#submit-invitation').button('reset');
invite_status.text(i18n.t('User invited successfully.', {count: (invitee_emails.val().match(/@/g) || [] ).length})) invite_status.text(i18n.t('User invited successfully.',
{count: (invitee_emails.val().match(/@/g) || []).length}))
.addClass('alert-success') .addClass('alert-success')
.show(); .show();
invitee_emails.val(''); invitee_emails.val('');

View File

@ -94,8 +94,8 @@ $(function () {
var max_scroll = this.scrollHeight - self.innerHeight() - 1; var max_scroll = this.scrollHeight - self.innerHeight() - 1;
e.stopPropagation(); e.stopPropagation();
if ( ((delta < 0) && (scroll <= 0)) if (((delta < 0) && (scroll <= 0)) ||
|| ((delta > 0) && (scroll >= max_scroll))) { ((delta > 0) && (scroll >= max_scroll))) {
e.preventDefault(); e.preventDefault();
} }
}); });