Skip to content

Commit

Permalink
Fix up linting, make lint clean
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jakebailey committed Oct 27, 2022
1 parent 47b47af commit 0e834c3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 57 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"local/simple-indent": "error",
"local/debug-assert": "error",
"local/no-keywords": "error",
"local/one-namespace-per-file": "error",

// eslint-plugin-import
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
Expand Down
45 changes: 0 additions & 45 deletions scripts/eslint/rules/one-namespace-per-file.cjs

This file was deleted.

3 changes: 1 addition & 2 deletions src/compiler/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import {

/* Tracing events for the compiler. */

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

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

let fs: typeof import("fs");
Expand Down
1 change: 0 additions & 1 deletion src/loggedIO/loggedIO.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as ts from "./_namespaces/ts";
import * as Harness from "./_namespaces/Harness";

// eslint-disable-line local/one-namespace-per-file
interface FileInformation {
contents?: string;
contentsPath?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ export class ProjectService {
configFileName: configFileName(),
projectType: project instanceof ExternalProject ? "external" : "configured",
languageServiceEnabled: project.languageServiceEnabled,
version: version, // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
version,
};
this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data });

Expand Down
2 changes: 1 addition & 1 deletion src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,7 @@ export class Session<TMessage = string> implements EventSender {

private handlers = new Map(getEntries<(request: protocol.Request) => HandlerResponse>({
[CommandNames.Status]: () => {
const response: protocol.StatusResponseBody = { version: version }; // eslint-disable-line @typescript-eslint/no-unnecessary-qualifier
const response: protocol.StatusResponseBody = { version };
return this.requiredResponse(response);
},
[CommandNames.OpenExternalProject]: (request: protocol.OpenExternalProjectRequest) => {
Expand Down
4 changes: 2 additions & 2 deletions src/services/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ declare global {
declare global {
// Module transform: converted from ambient declaration
/** @internal */
var Promise: PromiseConstructor;
} // eslint-disable-line no-var
var Promise: PromiseConstructor; // eslint-disable-line no-var
}

// These utilities are common to multiple language service features.
//#region
Expand Down
7 changes: 3 additions & 4 deletions src/testRunner/parallel/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function start() {
let totalPassing = 0;
const startDate = new Date();

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

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

0 comments on commit 0e834c3

Please sign in to comment.