Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 56135b5

Browse files
authored
chore: clean up obsolete eslint disable comments (#1760)
1 parent dd9de59 commit 56135b5

12 files changed

Lines changed: 5 additions & 21 deletions

File tree

lib/detector.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line import/no-extraneous-dependencies
21
import * as babelTypes from '@babel/types';
32
import * as babel from '@babel/parser';
43
import generate from '@babel/generator';
@@ -84,7 +83,6 @@ function reconstruct(node: babelTypes.Node) {
8483
let v = generate(node, { comments: false }).code.replace(/\n/g, '');
8584
let v2;
8685

87-
// eslint-disable-next-line no-constant-condition
8886
while (true) {
8987
v2 = v.replace(/\[ /g, '[').replace(/ \]/g, ']').replace(/ {2}/g, ' ');
9088

@@ -436,7 +434,6 @@ export function visitorMalformed(n: babelTypes.Node) {
436434
}
437435

438436
export function visitorUseSCWD(n: babelTypes.Node) {
439-
// eslint-disable-line camelcase
440437
if (!babelTypes.isCallExpression(n)) {
441438
return null;
442439
}

lib/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ async function needViaCache(target: NodeTarget) {
219219
}
220220

221221
export async function exec(argv2: string[]) {
222-
// eslint-disable-line complexity
223222
const argv = minimist(argv2, {
224223
boolean: [
225224
'b',
@@ -294,7 +293,6 @@ export async function exec(argv2: string[]) {
294293
case 'none':
295294
break;
296295
default:
297-
// eslint-disable-next-line no-console
298296
throw wasReported(
299297
`Invalid compression algorithm ${algo} ( should be None, Brotli or Gzip)`
300298
);

lib/refiner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function hasParent(file: string, records: FileRecords) {
2222
}
2323

2424
function purgeTopDirectories(records: FileRecords) {
25-
// eslint-disable-next-line no-constant-condition
2625
while (true) {
2726
let found = false;
2827

lib/walker.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,6 @@ class Walker {
738738
marker: Marker,
739739
derivative: Derivative
740740
) {
741-
// eslint-disable-line camelcase
742741
const newPackages: { packageJson: string; marker?: Marker }[] = [];
743742

744743
const catchReadFile = (file: string) => {
@@ -871,7 +870,6 @@ class Walker {
871870
}
872871

873872
async step_STORE_ANY(record: FileRecord, marker: Marker, store: number) {
874-
// eslint-disable-line camelcase
875873
if (strictVerify) {
876874
assert(record.file === toNormalizedRealPath(record.file));
877875
}

prelude/bootstrap.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function payloadFileSync(pointer) {
588588
process.pkg.path.resolve = function resolve() {
589589
const args = cloneArgs(arguments);
590590
args.unshift(path.dirname(ENTRYPOINT));
591-
return path.resolve.apply(path, args); // eslint-disable-line prefer-spread
591+
return path.resolve.apply(path, args);
592592
};
593593
})();
594594

@@ -722,7 +722,6 @@ function payloadFileSync(pointer) {
722722
return fName;
723723
}
724724

725-
// eslint-disable-next-line prefer-arrow-callback
726725
const uncompressExternally = function uncompressExternally(dock) {
727726
if (!dock.externalFilename) {
728727
const snapshotFilename = dock.path;
@@ -737,7 +736,6 @@ function payloadFileSync(pointer) {
737736
return dock.externalFilename;
738737
};
739738

740-
// eslint-disable-next-line prefer-arrow-callback
741739
function uncompressExternallyPath(path_) {
742740
const entity = findVirtualFileSystemEntry(path_);
743741
const dock = { path: path_, entity, position: 0 };
@@ -750,7 +748,6 @@ function payloadFileSync(pointer) {
750748
return fd;
751749
}
752750

753-
// eslint-disable-next-line prefer-arrow-callback
754751
function openFromSnapshot(path_, uncompress, cb) {
755752
const cb2 = cb || rethrow;
756753
const entity = findVirtualFileSystemEntry(path_);
@@ -1752,7 +1749,6 @@ function payloadFileSync(pointer) {
17521749
return process.binding('fs').internalModuleStat(makeLong(fNative));
17531750
}
17541751

1755-
// eslint-disable-next-line prefer-arrow-callback
17561752
fs.internalModuleStat = function internalModuleStat(long) {
17571753
// from node comments:
17581754
// Used to speed up module loading. Returns 0 if the path refers to

test/test-50-ast-parsing-2/test-x-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require(/**/ async + 75.25 /**/);
1818
require(/**/ __dirname + '/' + async /**/); // eslint-disable-line no-path-concat
1919
require(/**/ __dirname + '/' + async + 35.5 /**/); // eslint-disable-line no-path-concat
2020

21-
require(/**/ [async, 'js'].join('.') /**/); // eslint-disable-line array-bracket-spacing
21+
require(/**/ [async, 'js'].join('.') /**/);
2222
// TODO require({ async: "js" }.join("."));
2323

2424
require(/**/ async[0] /**/);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22

33
global.x = 42;
4-
console.log(x); // eslint-disable-line no-undef
4+
console.log(x);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict';
22

33
global.y = 84;
4-
console.log(y); // eslint-disable-line no-undef
4+
console.log(y);

test/test-50-many-arrow-functions/test-z-creator.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
// eslint-disable no-useless-concat
43
let s =
54
'function EventEmitter () {\n' +
65
' this.listeners = [];\n' +

test/test-50-many-callbacks/test-z-creator.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
// eslint-disable no-useless-concat
4-
53
let s = "console.log('test');\n";
64

75
for (let i = 0; i < 100; i += 1) {

0 commit comments

Comments
 (0)