tools: enable additional eslint rules

Enable additional rules that node either already adheres to
or it makes sense to do so going forward: for-direction,
accessor-pairs, no-lonely-if and symbol-description.

Fix all instances of no-lonely-if in lib & test and disable
accessor-pairs in test-util-inspect.

PR-URL: https://github.com/nodejs/node/pull/16243
Refs: https://eslint.org/docs/rules/for-direction
Refs: https://eslint.org/docs/rules/accessor-pairs
Refs: https://eslint.org/docs/rules/no-lonely-if
Refs: https://eslint.org/docs/rules/symbol-description
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Anatoli Papirovski committed 2017-10-19 13:54:14 -04:00
1 parent bf1bacef6b
commit 3c0ebf5aca
22 files changed
+118 -138

No files matched your search

+2 -4
View File
@@ -43,10 +43,8 @@ module.exports.inSkipBlock = function(node) {
}
return false;
});
} else {
if (hasSkip(consequent.expression)) {
hasSkipBlock = true;
}
} else if (hasSkip(consequent.expression)) {
hasSkipBlock = true;
}
}
return hasSkipBlock;