Skip to content

Commit 9ff5d03

Browse files
committed
Fix up linting, make lint clean
Now that we are modules, there's no reason to ban multiple namespaces per file; each file is its own scope and declaring a namespace won't merge it into any other files.
1 parent d9374d7 commit 9ff5d03

File tree

8 files changed

+8
-57
lines changed

8 files changed

+8
-57
lines changed

Diff for: .eslintrc.json

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"local/simple-indent": "error",
8888
"local/debug-assert": "error",
8989
"local/no-keywords": "error",
90-
"local/one-namespace-per-file": "error",
9190

9291
// eslint-plugin-import
9392
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],

Diff for: scripts/eslint/rules/one-namespace-per-file.cjs

-45
This file was deleted.

Diff for: src/compiler/tracing.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import {
77

88
/* Tracing events for the compiler. */
99

10-
// eslint-disable-line local/one-namespace-per-file
1110
// should be used as tracing?.___
1211
/** @internal */
1312
export let tracing: typeof tracingEnabled | undefined;
1413
// enable the above using startTracing()
1514

1615
// `tracingEnabled` should never be used directly, only through the above
17-
namespace tracingEnabled { // eslint-disable-line local/one-namespace-per-file
16+
namespace tracingEnabled {
1817
type Mode = "project" | "build" | "server";
1918

2019
let fs: typeof import("fs");

Diff for: src/loggedIO/loggedIO.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as ts from "./_namespaces/ts";
22
import * as Harness from "./_namespaces/Harness";
33

4-
// eslint-disable-line local/one-namespace-per-file
54
interface FileInformation {
65
contents?: string;
76
contentsPath?: string;

Diff for: src/server/editorServices.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,7 @@ export class ProjectService {
20792079
configFileName: configFileName(),
20802080
projectType: project instanceof ExternalProject ? "external" : "configured",
20812081
languageServiceEnabled: project.languageServiceEnabled,
2082-
version: version, // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
2082+
version,
20832083
};
20842084
this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data });
20852085

Diff for: src/server/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ export class Session<TMessage = string> implements EventSender {
29532953

29542954
private handlers = new Map(getEntries<(request: protocol.Request) => HandlerResponse>({
29552955
[CommandNames.Status]: () => {
2956-
const response: protocol.StatusResponseBody = { version: version }; // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
2956+
const response: protocol.StatusResponseBody = { version };
29572957
return this.requiredResponse(response);
29582958
},
29592959
[CommandNames.OpenExternalProject]: (request: protocol.OpenExternalProjectRequest) => {

Diff for: src/services/utilities.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ declare global {
7575
declare global {
7676
// Module transform: converted from ambient declaration
7777
/** @internal */
78-
var Promise: PromiseConstructor;
79-
} // eslint-disable-line no-var
78+
var Promise: PromiseConstructor; // eslint-disable-line no-var
79+
}
8080

8181
// These utilities are common to multiple language service features.
8282
//#region

Diff for: src/testRunner/parallel/host.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function start() {
249249
let totalPassing = 0;
250250
const startDate = new Date();
251251

252-
const progressBars = new ProgressBars({ noColors: noColors }); // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
252+
const progressBars = new ProgressBars({ noColors });
253253
const progressUpdateInterval = 1 / progressBars._options.width;
254254
let nextProgress = progressUpdateInterval;
255255

@@ -259,7 +259,7 @@ export function start() {
259259
let closedWorkers = 0;
260260
for (let i = 0; i < workerCount; i++) {
261261
// TODO: Just send the config over the IPC channel or in the command line arguments
262-
const config: TestConfig = { light: lightMode, listenForWork: true, runUnitTests: runUnitTests, stackTraceLimit: stackTraceLimit, timeout: globalTimeout }; // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
262+
const config: TestConfig = { light: lightMode, listenForWork: true, runUnitTests, stackTraceLimit, timeout: globalTimeout };
263263
const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`);
264264
IO.writeFile(configPath, JSON.stringify(config));
265265
const worker: Worker = {
@@ -558,8 +558,7 @@ export function start() {
558558
failedTestReporter = new FailedTestReporter(replayRunner, {
559559
reporterOptions: {
560560
file: path.resolve(".failed-tests"),
561-
keepFailed: keepFailed // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
562-
// eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
561+
keepFailed,
563562
}
564563
});
565564
}

0 commit comments

Comments
 (0)