Switch yoda eslint rule from warning to error (in .eslintrc)

This commit is contained in:
lonerz 2016-12-05 02:39:24 +00:00 committed by Tim Abbott
parent 025fe9980b
commit a8b39e6c0f
3 changed files with 3 additions and 3 deletions

View File

@ -209,6 +209,6 @@
"valid-typeof": ["error", { "requireStringLiterals": true }], "valid-typeof": ["error", { "requireStringLiterals": true }],
"wrap-iife": 2, "wrap-iife": 2,
"wrap-regex": 0, "wrap-regex": 0,
"yoda": 1 "yoda": 2
} }
} }

View File

@ -377,7 +377,7 @@ function process_hotkey(e) {
$(document).keydown(function (e) { $(document).keydown(function (e) {
// Restrict to non-alphanumeric keys // Restrict to non-alphanumeric keys
// check if 27 (esc) because it doesn't register under .keypress() // check if 27 (esc) because it doesn't register under .keypress()
if (48 > e.which || 90 < e.which || e.which === 27) { if (e.which < 48 || e.which > 90 || e.which === 27) {
if (process_hotkey(e)) { if (process_hotkey(e)) {
e.preventDefault(); e.preventDefault();
} }

View File

@ -526,7 +526,7 @@ function toggle_filter_displayed(e) {
if (e.target.id === 'streams_inline_cog') { if (e.target.id === 'streams_inline_cog') {
return; return;
} }
if (0 === $('.stream-list-filter.notdisplayed').length) { if ($('.stream-list-filter.notdisplayed').length === 0) {
exports.clear_and_hide_search(); exports.clear_and_hide_search();
} else { } else {
exports.initiate_search(); exports.initiate_search();