Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,test: make argument linting more stringent #6720

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ try {
} catch (e) {
threw = true;
assert(e instanceof AnotherErrorType,
`expected AnotherErrorType, received ${e}`);
`expected AnotherErrorType, received ${e}`);
}

assert.ok(threw);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-pipe-connect-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var notSocketClient = net.createConnection(emptyTxt, function() {

notSocketClient.on('error', function(err) {
assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED',
`received ${err.code} instead of ENOTSOCK or ECONNREFUSED`);
`received ${err.code} instead of ENOTSOCK or ECONNREFUSED`);
notSocketErrorFired = true;
});

Expand Down
28 changes: 14 additions & 14 deletions test/parallel/test-tick-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ process.chdir(common.tmpDir);
// Unknown checked for to prevent flakiness, if pattern is not found,
// then a large number of unknown ticks should be present
runTest(/LazyCompile.*\[eval\]:1|.*% UNKNOWN/,
`function f() {
for (var i = 0; i < 1000000; i++) {
i++;
}
setImmediate(function() { f(); });
};
setTimeout(function() { process.exit(0); }, 2000);
f();`);
`function f() {
for (var i = 0; i < 1000000; i++) {
i++;
}
setImmediate(function() { f(); });
};
setTimeout(function() { process.exit(0); }, 2000);
f();`);
if (common.isWindows ||
common.isSunOS ||
common.isAix ||
Expand All @@ -36,12 +36,12 @@ if (common.isWindows ||
return;
}
runTest(/RunInDebugContext/,
`function f() {
require(\'vm\').runInDebugContext(\'Debug\');
setImmediate(function() { f(); });
};
setTimeout(function() { process.exit(0); }, 2000);
f();`);
`function f() {
require(\'vm\').runInDebugContext(\'Debug\');
setImmediate(function() { f(); });
};
setTimeout(function() { process.exit(0); }, 2000);
f();`);

function runTest(pattern, code) {
cp.execFileSync(process.execPath, ['-prof', '-pe', code]);
Expand Down
1 change: 0 additions & 1 deletion tools/eslint-rules/align-function-arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function checkArgumentAlignment(context, node) {
'CallExpression',
'FunctionExpression',
'ObjectExpression',
'TemplateLiteral'
];

const args = node.arguments;
Expand Down