chore(lint): enable duplicateModuleImport tslint check
This commit is contained in:
parent
5f999225ba
commit
2019050db2
|
@ -1,6 +1,6 @@
|
|||
import {KeyValueChangeRecord} from '@angular/core';
|
||||
import {
|
||||
DoCheck,
|
||||
KeyValueChangeRecord,
|
||||
KeyValueDiffer,
|
||||
KeyValueDiffers,
|
||||
ElementRef,
|
||||
|
|
|
@ -1,23 +1,18 @@
|
|||
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
||||
import {Math} from '../facade/math';
|
||||
import {ANY_STATE, EMPTY_STATE} from '../../core_private';
|
||||
import {ANY_STATE, FILL_STYLE_FLAG} from '../../core_private';
|
||||
import {
|
||||
IS_DART,
|
||||
RegExpWrapper,
|
||||
isArray,
|
||||
isPresent,
|
||||
isBlank,
|
||||
isNumber,
|
||||
isString,
|
||||
isStringMap,
|
||||
NumberWrapper
|
||||
} from '../facade/lang';
|
||||
|
||||
import {FILL_STYLE_FLAG} from '../../core_private';
|
||||
|
||||
import {
|
||||
CompileAnimationEntryMetadata,
|
||||
CompileAnimationStateMetadata,
|
||||
CompileAnimationStateDeclarationMetadata,
|
||||
CompileAnimationStateTransitionMetadata,
|
||||
CompileAnimationMetadata,
|
||||
|
@ -32,7 +27,6 @@ import {
|
|||
import {
|
||||
AnimationAst,
|
||||
AnimationEntryAst,
|
||||
AnimationStateAst,
|
||||
AnimationStateTransitionAst,
|
||||
AnimationStateDeclarationAst,
|
||||
AnimationKeyframeAst,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {reflector} from '../core_private';
|
||||
import {
|
||||
CHANGE_DETECTION_STRATEGY_VALUES,
|
||||
VIEW_ENCAPSULATION_VALUES,
|
||||
LifecycleHooks,
|
||||
LIFECYCLE_HOOKS_VALUES
|
||||
LIFECYCLE_HOOKS_VALUES,
|
||||
reflector
|
||||
} from '../core_private';
|
||||
|
||||
import {
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
ViewEncapsulation,
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
import {SecurityContext} from '../core_private';
|
||||
import {
|
||||
AppElement,
|
||||
AppView,
|
||||
|
@ -22,7 +21,6 @@ import {
|
|||
devModeEqual,
|
||||
flattenNestedViewRenderNodes,
|
||||
interpolate,
|
||||
RenderDebugInfo,
|
||||
StaticNodeDebugInfo,
|
||||
TemplateRef_,
|
||||
uninitialized,
|
||||
|
@ -47,7 +45,8 @@ import {
|
|||
NoOpAnimationPlayer as NoOpAnimationPlayer_,
|
||||
AnimationGroupPlayer as AnimationGroupPlayer_,
|
||||
AnimationSequencePlayer as AnimationSequencePlayer_,
|
||||
AnimationStyleUtil
|
||||
AnimationStyleUtil,
|
||||
SecurityContext
|
||||
} from '../core_private';
|
||||
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
import {
|
||||
AnimationMetadata,
|
||||
AnimationEntryMetadata,
|
||||
AnimationStateMetadata,
|
||||
AnimationStateDeclarationMetadata,
|
||||
AnimationStateTransitionMetadata,
|
||||
AnimationStyleMetadata,
|
||||
AnimationKeyframesSequenceMetadata,
|
||||
AnimationAnimateMetadata,
|
||||
AnimationWithStepsMetadata,
|
||||
AnimationGroupMetadata,
|
||||
AttributeMetadata,
|
||||
OptionalMetadata,
|
||||
ComponentMetadata,
|
||||
|
@ -30,7 +40,6 @@ import {
|
|||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import * as cpl from './compile_metadata';
|
||||
import * as anmd from '@angular/core';
|
||||
import {DirectiveResolver} from './directive_resolver';
|
||||
import {PipeResolver} from './pipe_resolver';
|
||||
import {ViewResolver} from './view_resolver';
|
||||
|
@ -75,36 +84,36 @@ export class CompileMetadataResolver {
|
|||
return sanitizeIdentifier(identifier);
|
||||
}
|
||||
|
||||
getAnimationEntryMetadata(entry: anmd.AnimationEntryMetadata): cpl.CompileAnimationEntryMetadata {
|
||||
getAnimationEntryMetadata(entry: AnimationEntryMetadata): cpl.CompileAnimationEntryMetadata {
|
||||
var defs = entry.definitions.map(def => this.getAnimationStateMetadata(def));
|
||||
return new cpl.CompileAnimationEntryMetadata(entry.name, defs);
|
||||
}
|
||||
|
||||
getAnimationStateMetadata(value: anmd.AnimationStateMetadata): cpl.CompileAnimationStateMetadata {
|
||||
if (value instanceof anmd.AnimationStateDeclarationMetadata) {
|
||||
getAnimationStateMetadata(value: AnimationStateMetadata): cpl.CompileAnimationStateMetadata {
|
||||
if (value instanceof AnimationStateDeclarationMetadata) {
|
||||
var styles = this.getAnimationStyleMetadata(value.styles);
|
||||
return new cpl.CompileAnimationStateDeclarationMetadata(value.stateNameExpr, styles);
|
||||
} else if (value instanceof anmd.AnimationStateTransitionMetadata) {
|
||||
} else if (value instanceof AnimationStateTransitionMetadata) {
|
||||
return new cpl.CompileAnimationStateTransitionMetadata(value.stateChangeExpr, this.getAnimationMetadata(value.animation));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
getAnimationStyleMetadata(value: anmd.AnimationStyleMetadata): cpl.CompileAnimationStyleMetadata {
|
||||
getAnimationStyleMetadata(value: AnimationStyleMetadata): cpl.CompileAnimationStyleMetadata {
|
||||
return new cpl.CompileAnimationStyleMetadata(value.offset, value.styles);
|
||||
}
|
||||
|
||||
getAnimationMetadata(value: anmd.AnimationMetadata): cpl.CompileAnimationMetadata {
|
||||
if (value instanceof anmd.AnimationStyleMetadata) {
|
||||
getAnimationMetadata(value: AnimationMetadata): cpl.CompileAnimationMetadata {
|
||||
if (value instanceof AnimationStyleMetadata) {
|
||||
return this.getAnimationStyleMetadata(value);
|
||||
} else if (value instanceof anmd.AnimationKeyframesSequenceMetadata) {
|
||||
} else if (value instanceof AnimationKeyframesSequenceMetadata) {
|
||||
return new cpl.CompileAnimationKeyframesSequenceMetadata(value.steps.map(entry => this.getAnimationStyleMetadata(entry)));
|
||||
} else if (value instanceof anmd.AnimationAnimateMetadata) {
|
||||
} else if (value instanceof AnimationAnimateMetadata) {
|
||||
let animateData = <cpl.CompileAnimationStyleMetadata|cpl.CompileAnimationKeyframesSequenceMetadata>this.getAnimationMetadata(value.styles);
|
||||
return new cpl.CompileAnimationAnimateMetadata(value.timings, animateData);
|
||||
} else if (value instanceof anmd.AnimationWithStepsMetadata) {
|
||||
} else if (value instanceof AnimationWithStepsMetadata) {
|
||||
var steps = value.steps.map(step => this.getAnimationMetadata(step));
|
||||
if (value instanceof anmd.AnimationGroupMetadata) {
|
||||
if (value instanceof AnimationGroupMetadata) {
|
||||
return new cpl.CompileAnimationGroupMetadata(steps);
|
||||
} else {
|
||||
return new cpl.CompileAnimationSequenceMetadata(steps);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {SecurityContext} from '../../core_private';
|
||||
import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy} from '../../core_private';
|
||||
import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy, SecurityContext} from '../../core_private';
|
||||
|
||||
import {isBlank, isPresent} from '../../src/facade/lang';
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
AnimationEntryMetadata,
|
||||
OpaqueToken,
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
|
@ -28,8 +29,6 @@ export class TestComponentRenderer {
|
|||
insertRootElement(rootElementId: string) {}
|
||||
}
|
||||
|
||||
import {AnimationEntryMetadata} from '@angular/core';
|
||||
|
||||
export var ComponentFixtureAutoDetect = new OpaqueToken("ComponentFixtureAutoDetect");
|
||||
export var ComponentFixtureNoNgZone = new OpaqueToken("ComponentFixtureNoNgZone");
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import {Injectable, ViewMetadata, Type, BaseException} from '@angular/core';
|
||||
import {Injectable, ViewMetadata, Type, BaseException, AnimationEntryMetadata, resolveForwardRef} from '@angular/core';
|
||||
import {ViewResolver} from '../index';
|
||||
import {Map} from '../src/facade/collection';
|
||||
import {isPresent, stringify, isBlank, isArray} from '../src/facade/lang';
|
||||
import {AnimationEntryMetadata, resolveForwardRef} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class MockViewResolver extends ViewResolver {
|
||||
|
|
|
@ -13,10 +13,7 @@ import {
|
|||
ViewChildrenMetadata,
|
||||
ViewQueryMetadata,
|
||||
QueryMetadata,
|
||||
} from '@angular/core';
|
||||
import {ReflectorReader} from './core_private';
|
||||
import {Provider} from '@angular/core';
|
||||
import {
|
||||
Provider,
|
||||
HostMetadata,
|
||||
OptionalMetadata,
|
||||
InjectableMetadata,
|
||||
|
@ -24,6 +21,7 @@ import {
|
|||
SkipSelfMetadata,
|
||||
InjectMetadata,
|
||||
} from "@angular/core";
|
||||
import {ReflectorReader} from "./core_private";
|
||||
|
||||
/**
|
||||
* The host of the static resolver is expected to be able to provide module metadata in the form of
|
||||
|
@ -407,4 +405,4 @@ function mapStringMap(input: {[key: string]: any},
|
|||
|
||||
function isPrimitive(o: any): boolean {
|
||||
return o === null || (typeof o !== "function" && typeof o !== "object");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import * as provider_util from './src/di/provider_util';
|
|||
import * as console from './src/console';
|
||||
import {Provider} from './index';
|
||||
import * as reflection from './src/reflection/reflection';
|
||||
// tslint:disable-next-line
|
||||
import {Reflector} from './src/reflection/reflection';
|
||||
|
||||
import {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {isPresent} from '../facade/lang';
|
||||
import {isPresent, scheduleMicroTask} from '../facade/lang';
|
||||
import {NoOpAnimationPlayer, AnimationPlayer} from './animation_player';
|
||||
import {scheduleMicroTask} from '../facade/lang';
|
||||
|
||||
export class AnimationSequencePlayer implements AnimationPlayer {
|
||||
private _currentIndex: number = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {ConnectionBackend, Connection} from '../interfaces';
|
||||
import {ReadyState, RequestMethod, ResponseType} from '../enums';
|
||||
import {ReadyState, RequestMethod, ResponseType, ContentType} from '../enums';
|
||||
import {Request} from '../static_request';
|
||||
import {Response} from '../static_response';
|
||||
import {Headers} from '../headers';
|
||||
|
@ -10,7 +10,6 @@ import {isPresent, isString} from '../../src/facade/lang';
|
|||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observer} from 'rxjs/Observer';
|
||||
import {isSuccess, getResponseURL} from '../http_utils';
|
||||
import {ContentType} from '../enums';
|
||||
|
||||
const XSSI_PREFIX = ')]}\',\n';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {RequestMethod} from './enums';
|
||||
import {ContentType, RequestMethod} from './enums';
|
||||
import {RequestArgs} from './interfaces';
|
||||
import {Headers} from './headers';
|
||||
import {ContentType} from './enums';
|
||||
import {URLSearchParams} from './url_search_params';
|
||||
import {normalizeMethodName} from './http_utils';
|
||||
import {isPresent, StringWrapper} from '../src/facade/lang';
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
ComponentRef
|
||||
} from "@angular/core";
|
||||
import {isBlank, isPresent} from "./facade/lang";
|
||||
import {wtfInit, SanitizationService, ReflectionCapabilities, AnimationDriver, NoOpAnimationDriver} from '../core_private';
|
||||
import {reflector, wtfInit, SanitizationService, ReflectionCapabilities, AnimationDriver, NoOpAnimationDriver} from '../core_private';
|
||||
import {WebAnimationsDriver} from '../src/dom/web_animations_driver';
|
||||
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS, PlatformLocation} from "@angular/common";
|
||||
import {DomSanitizationService, DomSanitizationServiceImpl} from "./security/dom_sanitization_service";
|
||||
|
@ -37,7 +37,6 @@ import {BrowserPlatformLocation} from "./browser/location/browser_platform_locat
|
|||
import {COMPILER_PROVIDERS, XHR} from "@angular/compiler";
|
||||
import {CachedXHR} from "./xhr/xhr_cache";
|
||||
import {XHRImpl} from "./xhr/xhr_impl";
|
||||
import {reflector} from '../core_private';
|
||||
|
||||
export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =
|
||||
[{provide: XHR, useClass: CachedXHR}];
|
||||
|
|
|
@ -7,7 +7,6 @@ import {
|
|||
RenderComponentType,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import {RenderDebugInfo} from '../../core_private';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
|
@ -28,7 +27,8 @@ import {
|
|||
AnimationKeyframe,
|
||||
AnimationStyles,
|
||||
AnimationPlayer,
|
||||
AnimationDriver
|
||||
AnimationDriver,
|
||||
RenderDebugInfo,
|
||||
} from '../../core_private';
|
||||
|
||||
import {EventManager} from './events/event_manager';
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
Injectable,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import {RenderDebugInfo} from '../../../core_private';
|
||||
|
||||
import {ClientMessageBrokerFactory, FnArg, UiArguments} from '../shared/client_message_broker';
|
||||
import {isPresent, isBlank} from '../../../src/facade/lang';
|
||||
|
@ -17,7 +16,7 @@ import {MessageBus} from '../shared/message_bus';
|
|||
import {ObservableWrapper} from '../../../src/facade/async';
|
||||
import {deserializeGenericEvent} from './event_deserializer';
|
||||
|
||||
import {AnimationKeyframe, AnimationPlayer, AnimationStyles} from '../../../core_private';
|
||||
import {AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo} from '../../../core_private';
|
||||
|
||||
@Injectable()
|
||||
export class WebWorkerRootRenderer implements RootRenderer {
|
||||
|
|
|
@ -12,8 +12,7 @@ import {RoutesMetadata, RouteMetadata} from './metadata/metadata';
|
|||
import {Type, isBlank, isPresent, stringify} from './facade/lang';
|
||||
import {ListWrapper, StringMapWrapper} from './facade/collection';
|
||||
import {PromiseWrapper} from './facade/promise';
|
||||
import {BaseException, ComponentFactory} from '@angular/core';
|
||||
import {ComponentResolver} from '@angular/core';
|
||||
import {BaseException, ComponentFactory, ComponentResolver} from '@angular/core';
|
||||
import {DEFAULT_OUTLET_NAME} from './constants';
|
||||
import {reflector} from './core_private';
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import {OnInit, provide, ReflectiveInjector, ComponentResolver} from '@angular/core';
|
||||
import {BaseException, provide, ReflectiveInjector, ComponentResolver} from '@angular/core';
|
||||
import {RouterOutlet} from './directives/router_outlet';
|
||||
import {Type, isBlank, isPresent} from './facade/lang';
|
||||
import {ListWrapper} from './facade/collection';
|
||||
import {ListWrapper, StringMapWrapper} from './facade/collection';
|
||||
import {EventEmitter, Observable, PromiseWrapper, ObservableWrapper} from './facade/async';
|
||||
import {StringMapWrapper} from './facade/collection';
|
||||
import {BaseException} from '@angular/core';
|
||||
import {RouterUrlSerializer} from './router_url_serializer';
|
||||
import {CanDeactivate} from './interfaces';
|
||||
import {recognize} from './recognize';
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import {ComponentResolver} from '@angular/core';
|
||||
import {ApplicationRef, BaseException, ComponentResolver} from '@angular/core';
|
||||
import {LocationStrategy, PathLocationStrategy, Location} from '@angular/common';
|
||||
import {Router, RouterOutletMap} from './router';
|
||||
import {RouteSegment} from './segments';
|
||||
import {RouterUrlSerializer, DefaultRouterUrlSerializer} from './router_url_serializer';
|
||||
import {ApplicationRef} from '@angular/core';
|
||||
import {BaseException} from '@angular/core';
|
||||
|
||||
/**
|
||||
* The Platform agnostic ROUTER PROVIDERS
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"rules": {
|
||||
"duplicateModuleImport": true,
|
||||
"semicolon": true,
|
||||
"variable-name": false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue