no-redeclare
This commit is contained in:
parent
810303542d
commit
136f4cfc0f
|
@ -99,7 +99,7 @@
|
|||
"no-multiple-empty-lines": "off",
|
||||
"no-new-func": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-redeclare": "off",
|
||||
"no-redeclare": "error",
|
||||
"no-return-await": "error",
|
||||
"no-restricted-globals": ["error",
|
||||
{ "name": "setTimeout" },
|
||||
|
|
1
scripts/failed-tests.d.ts
vendored
1
scripts/failed-tests.d.ts
vendored
|
@ -12,6 +12,7 @@ declare class FailedTestsReporter extends Mocha.reporters.Base {
|
|||
done(failures: number, fn?: (failures: number) => void): void;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
declare namespace FailedTestsReporter {
|
||||
interface ReporterOptions {
|
||||
file?: string;
|
||||
|
|
|
@ -1055,6 +1055,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export type AffectedFileResult<T> = { result: T; affected: SourceFile | Program; } | undefined;
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function getFileEmitOutput(program: Program, sourceFile: SourceFile, emitOnlyDtsFiles: boolean,
|
||||
cancellationToken?: CancellationToken, customTransformers?: CustomTransformers): EmitOutput {
|
||||
|
@ -80,7 +81,8 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts.BuilderState {
|
||||
/**
|
||||
* Information about the source file: Its version and optional signature from last emit
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace ts {
|
|||
export const version = `${versionMajorMinor}.0-dev`;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
/**
|
||||
* Type of objects whose values are all of the same type.
|
||||
|
@ -68,6 +69,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export const emptyArray: never[] = [] as never[];
|
||||
|
||||
|
|
|
@ -3423,6 +3423,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export const nullTransformationContext: TransformationContext = {
|
||||
enableEmitNotification: noop,
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace ts {
|
|||
|
||||
/*@internal*/
|
||||
/** Performance measurements for the compiler. */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts.performance {
|
||||
declare const onProfilerEvent: { (markName: string): void; profiler: boolean; };
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
const minimumDate = new Date(-8640000000000000);
|
||||
const maximumDate = new Date(8640000000000000);
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export const resolvingEmptyArray: never[] = [] as never[];
|
||||
export const emptyMap = createMap<never>() as ReadonlyMap<never> & ReadonlyPragmaMap;
|
||||
|
@ -4615,6 +4616,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function getDefaultLibFileName(options: CompilerOptions): string {
|
||||
switch (options.target) {
|
||||
|
@ -5391,6 +5393,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
// Simple node tests of the form `node.kind === SyntaxKind.Foo`.
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
// Literals
|
||||
export function isNumericLiteral(node: Node): node is NumericLiteral {
|
||||
|
@ -6129,6 +6132,7 @@ namespace ts {
|
|||
//
|
||||
// All node tests in the following list should *not* reference parent pointers so that
|
||||
// they may be used with transformations.
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
/* @internal */
|
||||
export function isSyntaxList(n: Node): n is SyntaxList {
|
||||
|
@ -6971,8 +6975,8 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports {
|
||||
return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports;
|
||||
|
@ -7588,6 +7592,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) {
|
||||
const fromComponents = reducePathComponents(getPathComponents(from));
|
||||
|
|
|
@ -935,6 +935,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
function reduceNode<T>(node: Node | undefined, f: (memo: T, node: Node) => T, initial: T) {
|
||||
return node ? f(initial, node) : initial;
|
||||
|
|
|
@ -438,6 +438,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function readBuilderProgram(compilerOptions: CompilerOptions, readFile: (path: string) => string | undefined) {
|
||||
if (compilerOptions.out || compilerOptions.outFile) return undefined;
|
||||
|
|
|
@ -608,6 +608,7 @@ if (Harness.IO.tryEnableSourceMapsForHost && /^development$/i.test(Harness.IO.ge
|
|||
Harness.IO.tryEnableSourceMapsForHost();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace Harness {
|
||||
export const libFolder = "built/local/";
|
||||
const tcServicesFileName = ts.combinePaths(libFolder, "typescriptServices.js");
|
||||
|
|
|
@ -122,6 +122,7 @@ namespace ts.server {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts.server {
|
||||
export class ThrottledOperations {
|
||||
private readonly pendingTimeouts: Map<any> = createMap<any>();
|
||||
|
@ -219,6 +220,7 @@ namespace ts.server {
|
|||
}
|
||||
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
// Additional tsserver specific watch information
|
||||
export const enum WatchType {
|
||||
|
|
|
@ -530,6 +530,7 @@ namespace ts.FindAllReferences {
|
|||
|
||||
/** Encapsulates the core find-all-references algorithm. */
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts.FindAllReferences.Core {
|
||||
/** Core find-all-references algorithm. Handles special cases before delegating to `getReferencedSymbolsForSymbol`. */
|
||||
export function getReferencedSymbolsForNode(position: number, node: Node, program: Program, sourceFiles: ReadonlyArray<SourceFile>, cancellationToken: CancellationToken, options: Options = {}, sourceFilesSet: ReadonlyMap<true> = arrayToSet(sourceFiles, f => f.fileName)): ReadonlyArray<SymbolAndEntries> | undefined {
|
||||
|
|
|
@ -1438,6 +1438,7 @@ namespace ts {
|
|||
|
||||
// Display-part writer helpers
|
||||
/* @internal */
|
||||
// eslint-disable-next-line no-redeclare
|
||||
namespace ts {
|
||||
export function isFirstDeclarationOfSymbolParameter(symbol: Symbol) {
|
||||
return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter;
|
||||
|
|
Loading…
Reference in a new issue