Turn no-unsafe-negation ESLint rule to error

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2019-05-29 19:39:44 -03:00
parent 39bcd04878
commit b6df27fa6d
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@
"no-trailing-spaces": "error",
"no-underscore-dangle": "warn",
"no-unneeded-ternary": "error",
"no-unsafe-negation": "error",
"no-useless-escape": "error",
"object-curly-spacing": ["error", "always"],
"one-var": ["error", "never"],

View File

@ -3980,7 +3980,7 @@ Functions.showIndexEditDialog = function ($outer) {
* in the whole body
**/
Functions.showHints = function ($div) {
if ($div === undefined || ! $div instanceof jQuery || $div.length === 0) {
if ($div === undefined || !($div instanceof jQuery) || $div.length === 0) {
$div = $('body');
}
$div.find('.pma_hint').each(function () {
@ -4332,7 +4332,7 @@ Functions.slidingMessage = function (msg, $obj) {
// Don't show an empty message
return false;
}
if ($obj === undefined || ! $obj instanceof jQuery || $obj.length === 0) {
if ($obj === undefined || !($obj instanceof jQuery) || $obj.length === 0) {
// If the second argument was not supplied,
// we might have to create a new DOM node.
if ($('#PMA_slidingMessage').length === 0) {