mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
remove tslint configuration
This commit is contained in:
@@ -223,7 +223,7 @@ class CompilerTest {
|
||||
const record = utils.removeTestPathPrefixes(this.result.getSourceMapRecord()!);
|
||||
const baseline = (this.options.noEmitOnError && this.result.diagnostics.length !== 0) || record === undefined
|
||||
// Because of the noEmitOnError option no files are created. We need to return null because baselining isn't required.
|
||||
? null // tslint:disable-line no-null-keyword
|
||||
? null
|
||||
: record;
|
||||
Harness.Baseline.runBaseline(this.justName.replace(/\.tsx?$/, ".sourcemap.txt"), baseline);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,6 @@ class UserCodeRunner extends ExternalCompileRunnerBase {
|
||||
return "user";
|
||||
}
|
||||
report(result: ExecResult) {
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
return result.status === 0 && !result.stdout.length && !result.stderr.length ? null : `Exit Code: ${result.status}
|
||||
Standard output:
|
||||
${sortErrors(stripAbsoluteImportPaths(result.stdout.toString().replace(/\r\n/g, "\n")))}
|
||||
@@ -145,7 +144,6 @@ class DockerfileRunner extends ExternalCompileRunnerBase {
|
||||
}
|
||||
}
|
||||
report(result: ExecResult) {
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
return result.status === 0 && !result.stdout.length && !result.stderr.length ? null : `Exit Code: ${result.status}
|
||||
Standard output:
|
||||
${sanitizeDockerfileOutput(result.stdout.toString())}
|
||||
@@ -227,7 +225,6 @@ class DefinitelyTypedRunner extends ExternalCompileRunnerBase {
|
||||
report(result: ExecResult, cwd: string) {
|
||||
const stdout = removeExpectedErrors(result.stdout.toString(), cwd);
|
||||
const stderr = result.stderr.toString();
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
return !stdout.length && !stderr.length ? null : `Exit Code: ${result.status}
|
||||
Standard output:
|
||||
${stdout.replace(/\r\n/g, "\n")}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// tslint:disable no-unnecessary-type-assertion (TODO: tslint can't find node types)
|
||||
|
||||
namespace Harness.Parallel.Host {
|
||||
export function start() {
|
||||
// tslint:disable-next-line:variable-name
|
||||
const Mocha = require("mocha") as typeof import("mocha");
|
||||
const Base = Mocha.reporters.Base;
|
||||
const color = Base.color;
|
||||
@@ -17,7 +14,6 @@ namespace Harness.Parallel.Host {
|
||||
const { statSync, readFileSync } = require("fs") as typeof import("fs");
|
||||
|
||||
// NOTE: paths for module and types for FailedTestReporter _do not_ line up due to our use of --outFile for run.js
|
||||
// tslint:disable-next-line:variable-name
|
||||
const FailedTestReporter = require(path.resolve(__dirname, "../../scripts/failed-tests")) as typeof import("../../../scripts/failed-tests");
|
||||
|
||||
const perfdataFileNameFragment = ".parallelperf";
|
||||
@@ -595,7 +591,7 @@ namespace Harness.Parallel.Host {
|
||||
consoleReporter.epilogue();
|
||||
if (noColors) Base.useColors = savedUseColors;
|
||||
|
||||
IO.writeFile(perfdataFileName(configOption), JSON.stringify(newPerfData, null, 4)); // tslint:disable-line:no-null-keyword
|
||||
IO.writeFile(perfdataFileName(configOption), JSON.stringify(newPerfData, null, 4));
|
||||
|
||||
if (xunitReporter) {
|
||||
xunitReporter.done(errorResults.length, failures => process.exit(failures));
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// tslint:disable no-unnecessary-type-assertion (TODO: tslint can't find node types)
|
||||
|
||||
namespace Harness.Parallel.Worker {
|
||||
export function start() {
|
||||
function hookUncaughtExceptions() {
|
||||
@@ -21,7 +19,7 @@ namespace Harness.Parallel.Worker {
|
||||
let exceptionsHooked = false;
|
||||
hookUncaughtExceptions();
|
||||
|
||||
// tslint:disable-next-line:variable-name - Capitalization is aligned with the global `Mocha` namespace for typespace/namespace references.
|
||||
// Capitalization is aligned with the global `Mocha` namespace for typespace/namespace references.
|
||||
const Mocha = require("mocha") as typeof import("mocha");
|
||||
|
||||
/**
|
||||
@@ -99,7 +97,6 @@ namespace Harness.Parallel.Worker {
|
||||
* @param context The test context (usually the NodeJS `global` object).
|
||||
*/
|
||||
function shimTestInterface(rootSuite: Mocha.Suite, context: Mocha.MochaGlobals) {
|
||||
// tslint:disable-next-line:variable-name
|
||||
const suites = [rootSuite];
|
||||
context.before = (title: string | Mocha.Func | Mocha.AsyncFunc, fn?: Mocha.Func | Mocha.AsyncFunc) => { suites[0].beforeAll(title as string, fn); };
|
||||
context.after = (title: string | Mocha.Func | Mocha.AsyncFunc, fn?: Mocha.Func | Mocha.AsyncFunc) => { suites[0].afterAll(title as string, fn); };
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`.
|
||||
/* tslint:disable:no-null-keyword */
|
||||
|
||||
namespace RWC {
|
||||
function runWithIOLog(ioLog: IoLog, fn: (oldIO: Harness.IO) => void) {
|
||||
const oldIO = Harness.IO;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// In harness baselines, null is different than undefined. See `generateActual` in `harness.ts`.
|
||||
/* tslint:disable:no-null-keyword */
|
||||
|
||||
class Test262BaselineRunner extends RunnerBase {
|
||||
private static readonly basePath = "internal/cases/test262";
|
||||
private static readonly helpersFilePath = "tests/cases/test262-harness/helpers.d.ts";
|
||||
|
||||
@@ -104,7 +104,6 @@ namespace ts {
|
||||
builderProgram = createEmitAndSemanticDiagnosticsBuilderProgram(program, host, builderProgram);
|
||||
const outputFileNames: string[] = [];
|
||||
try {
|
||||
// tslint:disable-next-line no-empty
|
||||
do {
|
||||
assert.isFalse(cancel);
|
||||
if (outputFileNames.length === cancelAfterEmitLength) {
|
||||
|
||||
@@ -159,7 +159,6 @@ namespace ts {
|
||||
"dev/configs/third.json": JSON.stringify({
|
||||
extends: "./second",
|
||||
compilerOptions: {
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
module: null
|
||||
},
|
||||
include: ["../supplemental.*"]
|
||||
@@ -169,7 +168,6 @@ namespace ts {
|
||||
compilerOptions: {
|
||||
module: "system"
|
||||
},
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
include: null,
|
||||
files: ["../main.ts"]
|
||||
}),
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace ts {
|
||||
|
||||
function createDiagnosticForConfigFile(json: any, start: number, length: number, diagnosticMessage: DiagnosticMessage, arg0: string) {
|
||||
const text = JSON.stringify(json);
|
||||
const file = <SourceFile>{ // tslint:disable-line no-object-literal-type-assertion
|
||||
const file = <SourceFile>{
|
||||
fileName: caseInsensitiveTsconfigPath,
|
||||
kind: SyntaxKind.SourceFile,
|
||||
text
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace ts {
|
||||
}
|
||||
const initResult = convertToTSConfig(commandLine, configPath, configParseHost);
|
||||
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
Harness.Baseline.runBaseline(outputFileName, JSON.stringify(initResult, null, 4) + "\n");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace ts {
|
||||
testTypingsIgnored(["a", "b"]);
|
||||
testTypingsIgnored({ a: "b" });
|
||||
testTypingsIgnored(/*typings*/ true);
|
||||
testTypingsIgnored(/*typings*/ null); // tslint:disable-line no-null-keyword
|
||||
testTypingsIgnored(/*typings*/ null);
|
||||
testTypingsIgnored(/*typings*/ undefined);
|
||||
});
|
||||
it("module name as directory - load index.d.ts", () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Some tests have trailing whitespace
|
||||
// tslint:disable trim-trailing-whitespace
|
||||
|
||||
namespace ts {
|
||||
describe("unittests:: services:: textChanges", () => {
|
||||
|
||||
@@ -53,14 +53,12 @@ namespace ts {
|
||||
|
||||
it("Correct errors for " + justName, () => {
|
||||
Harness.Baseline.runBaseline(justName.replace(/\.tsx?$/, ".errors.txt"),
|
||||
// tslint:disable-next-line no-null-keyword
|
||||
transpileResult.diagnostics!.length === 0 ? null : Harness.Compiler.getErrorBaseline(toBeCompiled, transpileResult.diagnostics!));
|
||||
});
|
||||
|
||||
if (canUseOldTranspile) {
|
||||
it("Correct errors (old transpile) for " + justName, () => {
|
||||
Harness.Baseline.runBaseline(justName.replace(/\.tsx?$/, ".oldTranspile.errors.txt"),
|
||||
// tslint:disable-next-line no-null-keyword
|
||||
oldTranspileDiagnostics.length === 0 ? null : Harness.Compiler.getErrorBaseline(toBeCompiled, oldTranspileDiagnostics));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -193,7 +193,6 @@ declare const console: { log(msg: any): void; };`;
|
||||
|
||||
function generateBaseline(fs: vfs.FileSystem, proj: string, scenario: string, subScenario: string, baseFs: vfs.FileSystem) {
|
||||
const patch = fs.diff(baseFs);
|
||||
// tslint:disable-next-line:no-null-keyword
|
||||
Harness.Baseline.runBaseline(`tsbuild/${proj}/${subScenario.split(" ").join("-")}/${scenario.split(" ").join("-")}.js`, patch ? vfs.formatPatch(patch) : null);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace ts.tscWatch {
|
||||
const tests = subProjectFiles(SubProject.tests);
|
||||
const ui = subProjectFiles(SubProject.ui);
|
||||
const allFiles: ReadonlyArray<File> = [libFile, ...core, ...logic, ...tests, ...ui];
|
||||
const testProjectExpectedWatchedFiles = [core[0], core[1], core[2]!, ...logic, ...tests].map(f => f.path.toLowerCase()); // tslint:disable-line no-unnecessary-type-assertion (TODO: type assertion should be necessary)
|
||||
const testProjectExpectedWatchedFiles = [core[0], core[1], core[2]!, ...logic, ...tests].map(f => f.path.toLowerCase()); // TODO: type assertion should be necessary
|
||||
const testProjectExpectedWatchedDirectoriesRecursive = [projectPath(SubProject.core), projectPath(SubProject.logic)];
|
||||
|
||||
function createSolutionInWatchMode(allFiles: ReadonlyArray<File>, defaultOptions?: BuildOptions, disableConsoleClears?: boolean) {
|
||||
@@ -297,7 +297,7 @@ export class someClass2 { }`);
|
||||
const allFiles = [libFile, ...core, logic[1], ...tests];
|
||||
const host = createTsBuildWatchSystem(allFiles, { currentDirectory: projectsLocation });
|
||||
createSolutionBuilderWithWatch(host, [`${project}/${SubProject.tests}`]);
|
||||
checkWatchedFiles(host, [core[0], core[1], core[2]!, logic[0], ...tests].map(f => f.path.toLowerCase())); // tslint:disable-line no-unnecessary-type-assertion (TODO: type assertion should be necessary)
|
||||
checkWatchedFiles(host, [core[0], core[1], core[2]!, logic[0], ...tests].map(f => f.path.toLowerCase())); // TODO: type assertion should be necessary
|
||||
checkWatchedDirectories(host, emptyArray, /*recursive*/ false);
|
||||
checkWatchedDirectories(host, [projectPath(SubProject.core)], /*recursive*/ true);
|
||||
checkOutputErrorsInitial(host, [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -283,9 +283,7 @@ namespace ts.server {
|
||||
session.onMessage(JSON.stringify(req));
|
||||
req.seq = i;
|
||||
i++;
|
||||
/* tslint:disable no-null-keyword */
|
||||
req.arguments = null;
|
||||
/* tslint:enable no-null-keyword */
|
||||
session.onMessage(JSON.stringify(req));
|
||||
req.seq = i;
|
||||
i++;
|
||||
@@ -548,7 +546,6 @@ namespace ts.server {
|
||||
});
|
||||
});
|
||||
it("has access to the project service", () => {
|
||||
// tslint:disable-next-line no-unused-expression
|
||||
new class extends TestSession {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user