Skip to content

Commit 5d71ee4

Browse files
committed
fixup on files post lint config update
Issue: S3UTILS-171
1 parent 1297ba0 commit 5d71ee4

File tree

12 files changed

+20
-36
lines changed

12 files changed

+20
-36
lines changed

CountItems/CountWorkerObj.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const uuid = require('node-uuid');
1+
const { v4: uuid } = require('uuid');
22
const { once } = require('arsenal').jsutil;
33
const { deserializeBigInts, serializeBigInts } = require('./utils/utils');
44

@@ -21,9 +21,9 @@ class CountWorkerObj {
2121
}
2222
});
2323
this._worker.on('message', data => {
24-
if (data.owner !== 'scality') return;
24+
if (data.owner !== 'scality') {return;}
2525
const cb = this._getCallback(data.id);
26-
if (!cb) return;
26+
if (!cb) {return;}
2727
switch (data.type) {
2828
case 'setup':
2929
if (data.status === 'passed') {
@@ -81,7 +81,7 @@ class CountWorkerObj {
8181
}
8282

8383
_getCallback(id) {
84-
if (!this.callbacks.has(id)) return null;
84+
if (!this.callbacks.has(id)) {return null;}
8585
const ret = this.callbacks.get(id);
8686
this.callbacks.delete(id);
8787
return ret.callback;
@@ -95,7 +95,7 @@ class CountWorkerObj {
9595
}
9696

9797
setup(callback) {
98-
const id = uuid.v4();
98+
const id = uuid();
9999
this._addCallback(id, 'setup', callback);
100100
this._worker.send({
101101
id,
@@ -108,7 +108,7 @@ class CountWorkerObj {
108108
if (!this.clientConnected || !this._worker.isConnected()) {
109109
return callback();
110110
}
111-
const id = uuid.v4();
111+
const id = uuid();
112112
this._addCallback(id, 'teardown', callback);
113113
return this._worker.send({
114114
id,
@@ -118,7 +118,7 @@ class CountWorkerObj {
118118
}
119119

120120
count(bucketInfo, callback) {
121-
const id = uuid.v4();
121+
const id = uuid();
122122
this._addCallback(id, 'count', (err, results) => {
123123
if (err) {
124124
return callback(err);

CountItems/utils/createWorkers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ const cluster = require('cluster');
22
const CountWorkerObj = require('../CountWorkerObj');
33

44
function createWorkers(numWorkers) {
5-
if (!cluster.isMaster) return {};
5+
if (!cluster.isMaster) {
6+
return {};
7+
}
68
const workers = {};
79
for (let i = 0; i < numWorkers; ++i) {
810
const worker = cluster.fork(process.env);

VerifyReplication/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
31
const { Logger } = require('werelogs');
42

53
const { defaults, mandatoryVars } = require('./constants');

VerifyReplication/storage/s3.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
31
const AWS = require('aws-sdk');
42
const fs = require('fs');
53
const http = require('http');

VerifyReplication/verifyReplication.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ function handlePrefixes(prefixList, cb) {
8888
bucket: statusObj.srcBucket,
8989
prefix,
9090
listingLimit,
91-
};
92-
// eslint-disable-next-line no-use-before-define
91+
};
9392
return listAndCompare(params, done);
9493
}, cb);
9594
}

compareBuckets/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* eslint-disable max-len */
21
/* eslint-disable no-console */
3-
/* eslint-disable comma-dangle */
42

53
const { Logger } = require('werelogs');
64

removeDeleteMarkers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-len */
21
/* eslint-disable no-console */
32

43
const { http } = require('httpagent');

repairDuplicateVersionIds.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ function repairObject(objInfo, cb) {
136136
(rawMD, next) => {
137137
const reVersionIds = /"versionId":"([^"]*)"/g;
138138
const versionIds = [];
139-
// eslint-disable-next-line no-constant-condition
140139
while (true) {
141140
const reVersionIdMatch = reVersionIds.exec(rawMD);
142141
if (!reVersionIdMatch) {
@@ -156,7 +155,7 @@ function repairObject(objInfo, cb) {
156155
// `objInfo.firstVersionId`, since it may have changed
157156
// since the scan ran
158157
//
159-
// eslint-disable-next-line no-param-reassign
158+
160159
[md.versionId] = versionIds;
161160
return putObjectMetadata(objInfo.objectUrl, md, err => {
162161
if (err) {

repairDuplicateVersionsSuite.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-disable max-len */
2-
/* eslint-disable no-console */
3-
/* eslint-disable comma-dangle */
4-
51
const async = require('async');
62
const crypto = require('crypto');
73
const fs = require('fs');

service-level-sidecar/bucketd.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ async function* listBuckets(log) {
3737
while (true) {
3838
let res;
3939

40-
try {
41-
// eslint-disable-next-line no-await-in-loop
40+
try {
4241
res = await listObjects(usersBucket, { ...listingParams, gt }, log);
4342
} catch (error) {
4443
if (error.NoSuchBucket) {

0 commit comments

Comments
 (0)