tools: enable eslint one-var rule
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
cbc6f39b71
commit
8be96579ae
@ -214,6 +214,7 @@ module.exports = {
|
||||
'no-unsafe-finally': 'error',
|
||||
'no-whitespace-before-property': 'error',
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'one-var': ['error', { initialized: 'never' }],
|
||||
'one-var-declaration-per-line': 'error',
|
||||
'operator-linebreak': ['error', 'after'],
|
||||
quotes: ['error', 'single', 'avoid-escape'],
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
tls = require('tls');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const tls = require('tls');
|
||||
|
||||
const common = require('../common.js');
|
||||
const bench = common.createBenchmark(main, {
|
||||
|
@ -40,8 +40,8 @@ if (cluster.isWorker) {
|
||||
|
||||
} else if (cluster.isMaster) {
|
||||
|
||||
const KILL_SIGNAL = 'SIGKILL',
|
||||
expected_results = {
|
||||
const KILL_SIGNAL = 'SIGKILL';
|
||||
const expected_results = {
|
||||
cluster_emitDisconnect: [1, "the cluster did not emit 'disconnect'"],
|
||||
cluster_emitExit: [1, "the cluster did not emit 'exit'"],
|
||||
cluster_exitCode: [null, 'the cluster exited w/ incorrect exitCode'],
|
||||
@ -50,14 +50,13 @@ if (cluster.isWorker) {
|
||||
worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"],
|
||||
worker_emitExit: [1, "the worker did not emit 'exit'"],
|
||||
worker_state: ['disconnected', 'the worker state is incorrect'],
|
||||
worker_exitedAfter: [false,
|
||||
'the .exitedAfterDisconnect flag is incorrect'],
|
||||
worker_exitedAfter: [false, 'the .exitedAfterDisconnect flag is incorrect'],
|
||||
worker_died: [true, 'the worker is still running'],
|
||||
worker_exitCode: [null, 'the worker exited w/ incorrect exitCode'],
|
||||
worker_signalCode: [KILL_SIGNAL,
|
||||
'the worker exited w/ incorrect signalCode']
|
||||
},
|
||||
results = {
|
||||
};
|
||||
const results = {
|
||||
cluster_emitDisconnect: 0,
|
||||
cluster_emitExit: 0,
|
||||
worker_emitDisconnect: 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user