tools: enable eslint no-undef-init rule
This also fixes the three entries that did not pass. PR-URL: https://github.com/nodejs/node/pull/18831 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
a926c1a18f
commit
ff5b56ea9d
@ -130,6 +130,7 @@ module.exports = {
|
||||
// http://eslint.org/docs/rules/#variables
|
||||
'no-delete-var': 'error',
|
||||
'no-undef': 'error',
|
||||
'no-undef-init': 'error',
|
||||
'no-unused-vars': ['error', { args: 'none' }],
|
||||
'no-use-before-define': ['error', {
|
||||
classes: true,
|
||||
|
@ -228,8 +228,8 @@ function getSystemErrorName(err) {
|
||||
// getConstructorOf is wrapped into this to save iterations
|
||||
function getIdentificationOf(obj) {
|
||||
const original = obj;
|
||||
let constructor = undefined;
|
||||
let tag = undefined;
|
||||
let constructor;
|
||||
let tag;
|
||||
|
||||
while (obj) {
|
||||
if (constructor === undefined) {
|
||||
|
@ -88,7 +88,7 @@ function testIt(atime, mtime, callback) {
|
||||
expect_errno('futimesSync', fd, ex, 'ENOSYS');
|
||||
}
|
||||
|
||||
let err = undefined;
|
||||
let err;
|
||||
try {
|
||||
fs.utimesSync('foobarbaz', atime, mtime);
|
||||
} catch (ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user