chore(lint): enable duplicateModuleImport tslint check

This commit is contained in:
Alex Eagle 2016-05-26 15:07:51 -07:00
parent 5f999225ba
commit 2019050db2
20 changed files with 46 additions and 57 deletions

View File

@ -1,6 +1,6 @@
import {KeyValueChangeRecord} from '@angular/core';
import { import {
DoCheck, DoCheck,
KeyValueChangeRecord,
KeyValueDiffer, KeyValueDiffer,
KeyValueDiffers, KeyValueDiffers,
ElementRef, ElementRef,

View File

@ -1,23 +1,18 @@
import {ListWrapper, StringMapWrapper} from '../facade/collection'; import {ListWrapper, StringMapWrapper} from '../facade/collection';
import {Math} from '../facade/math'; import {Math} from '../facade/math';
import {ANY_STATE, EMPTY_STATE} from '../../core_private'; import {ANY_STATE, FILL_STYLE_FLAG} from '../../core_private';
import { import {
IS_DART,
RegExpWrapper, RegExpWrapper,
isArray, isArray,
isPresent, isPresent,
isBlank, isBlank,
isNumber,
isString, isString,
isStringMap, isStringMap,
NumberWrapper NumberWrapper
} from '../facade/lang'; } from '../facade/lang';
import {FILL_STYLE_FLAG} from '../../core_private';
import { import {
CompileAnimationEntryMetadata, CompileAnimationEntryMetadata,
CompileAnimationStateMetadata,
CompileAnimationStateDeclarationMetadata, CompileAnimationStateDeclarationMetadata,
CompileAnimationStateTransitionMetadata, CompileAnimationStateTransitionMetadata,
CompileAnimationMetadata, CompileAnimationMetadata,
@ -32,7 +27,6 @@ import {
import { import {
AnimationAst, AnimationAst,
AnimationEntryAst, AnimationEntryAst,
AnimationStateAst,
AnimationStateTransitionAst, AnimationStateTransitionAst,
AnimationStateDeclarationAst, AnimationStateDeclarationAst,
AnimationKeyframeAst, AnimationKeyframeAst,

View File

@ -1,10 +1,10 @@
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
import {reflector} from '../core_private';
import { import {
CHANGE_DETECTION_STRATEGY_VALUES, CHANGE_DETECTION_STRATEGY_VALUES,
VIEW_ENCAPSULATION_VALUES, VIEW_ENCAPSULATION_VALUES,
LifecycleHooks, LifecycleHooks,
LIFECYCLE_HOOKS_VALUES LIFECYCLE_HOOKS_VALUES,
reflector
} from '../core_private'; } from '../core_private';
import { import {

View File

@ -11,7 +11,6 @@ import {
ViewEncapsulation, ViewEncapsulation,
TemplateRef TemplateRef
} from '@angular/core'; } from '@angular/core';
import {SecurityContext} from '../core_private';
import { import {
AppElement, AppElement,
AppView, AppView,
@ -22,7 +21,6 @@ import {
devModeEqual, devModeEqual,
flattenNestedViewRenderNodes, flattenNestedViewRenderNodes,
interpolate, interpolate,
RenderDebugInfo,
StaticNodeDebugInfo, StaticNodeDebugInfo,
TemplateRef_, TemplateRef_,
uninitialized, uninitialized,
@ -47,7 +45,8 @@ import {
NoOpAnimationPlayer as NoOpAnimationPlayer_, NoOpAnimationPlayer as NoOpAnimationPlayer_,
AnimationGroupPlayer as AnimationGroupPlayer_, AnimationGroupPlayer as AnimationGroupPlayer_,
AnimationSequencePlayer as AnimationSequencePlayer_, AnimationSequencePlayer as AnimationSequencePlayer_,
AnimationStyleUtil AnimationStyleUtil,
SecurityContext
} from '../core_private'; } from '../core_private';
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata'; import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';

View File

@ -1,4 +1,14 @@
import { import {
AnimationMetadata,
AnimationEntryMetadata,
AnimationStateMetadata,
AnimationStateDeclarationMetadata,
AnimationStateTransitionMetadata,
AnimationStyleMetadata,
AnimationKeyframesSequenceMetadata,
AnimationAnimateMetadata,
AnimationWithStepsMetadata,
AnimationGroupMetadata,
AttributeMetadata, AttributeMetadata,
OptionalMetadata, OptionalMetadata,
ComponentMetadata, ComponentMetadata,
@ -30,7 +40,6 @@ import {
import {StringMapWrapper} from '../src/facade/collection'; import {StringMapWrapper} from '../src/facade/collection';
import {BaseException} from '../src/facade/exceptions'; import {BaseException} from '../src/facade/exceptions';
import * as cpl from './compile_metadata'; import * as cpl from './compile_metadata';
import * as anmd from '@angular/core';
import {DirectiveResolver} from './directive_resolver'; import {DirectiveResolver} from './directive_resolver';
import {PipeResolver} from './pipe_resolver'; import {PipeResolver} from './pipe_resolver';
import {ViewResolver} from './view_resolver'; import {ViewResolver} from './view_resolver';
@ -75,36 +84,36 @@ export class CompileMetadataResolver {
return sanitizeIdentifier(identifier); return sanitizeIdentifier(identifier);
} }
getAnimationEntryMetadata(entry: anmd.AnimationEntryMetadata): cpl.CompileAnimationEntryMetadata { getAnimationEntryMetadata(entry: AnimationEntryMetadata): cpl.CompileAnimationEntryMetadata {
var defs = entry.definitions.map(def => this.getAnimationStateMetadata(def)); var defs = entry.definitions.map(def => this.getAnimationStateMetadata(def));
return new cpl.CompileAnimationEntryMetadata(entry.name, defs); return new cpl.CompileAnimationEntryMetadata(entry.name, defs);
} }
getAnimationStateMetadata(value: anmd.AnimationStateMetadata): cpl.CompileAnimationStateMetadata { getAnimationStateMetadata(value: AnimationStateMetadata): cpl.CompileAnimationStateMetadata {
if (value instanceof anmd.AnimationStateDeclarationMetadata) { if (value instanceof AnimationStateDeclarationMetadata) {
var styles = this.getAnimationStyleMetadata(value.styles); var styles = this.getAnimationStyleMetadata(value.styles);
return new cpl.CompileAnimationStateDeclarationMetadata(value.stateNameExpr, 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 new cpl.CompileAnimationStateTransitionMetadata(value.stateChangeExpr, this.getAnimationMetadata(value.animation));
} }
return null; return null;
} }
getAnimationStyleMetadata(value: anmd.AnimationStyleMetadata): cpl.CompileAnimationStyleMetadata { getAnimationStyleMetadata(value: AnimationStyleMetadata): cpl.CompileAnimationStyleMetadata {
return new cpl.CompileAnimationStyleMetadata(value.offset, value.styles); return new cpl.CompileAnimationStyleMetadata(value.offset, value.styles);
} }
getAnimationMetadata(value: anmd.AnimationMetadata): cpl.CompileAnimationMetadata { getAnimationMetadata(value: AnimationMetadata): cpl.CompileAnimationMetadata {
if (value instanceof anmd.AnimationStyleMetadata) { if (value instanceof AnimationStyleMetadata) {
return this.getAnimationStyleMetadata(value); 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))); 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); let animateData = <cpl.CompileAnimationStyleMetadata|cpl.CompileAnimationKeyframesSequenceMetadata>this.getAnimationMetadata(value.styles);
return new cpl.CompileAnimationAnimateMetadata(value.timings, animateData); 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)); var steps = value.steps.map(step => this.getAnimationMetadata(step));
if (value instanceof anmd.AnimationGroupMetadata) { if (value instanceof AnimationGroupMetadata) {
return new cpl.CompileAnimationGroupMetadata(steps); return new cpl.CompileAnimationGroupMetadata(steps);
} else { } else {
return new cpl.CompileAnimationSequenceMetadata(steps); return new cpl.CompileAnimationSequenceMetadata(steps);

View File

@ -1,5 +1,4 @@
import {SecurityContext} from '../../core_private'; import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy, SecurityContext} from '../../core_private';
import {EMPTY_STATE as EMPTY_ANIMATION_STATE, LifecycleHooks, isDefaultChangeDetectionStrategy} from '../../core_private';
import {isBlank, isPresent} from '../../src/facade/lang'; import {isBlank, isPresent} from '../../src/facade/lang';

View File

@ -1,4 +1,5 @@
import { import {
AnimationEntryMetadata,
OpaqueToken, OpaqueToken,
ComponentRef, ComponentRef,
ComponentFactory, ComponentFactory,
@ -28,8 +29,6 @@ export class TestComponentRenderer {
insertRootElement(rootElementId: string) {} insertRootElement(rootElementId: string) {}
} }
import {AnimationEntryMetadata} from '@angular/core';
export var ComponentFixtureAutoDetect = new OpaqueToken("ComponentFixtureAutoDetect"); export var ComponentFixtureAutoDetect = new OpaqueToken("ComponentFixtureAutoDetect");
export var ComponentFixtureNoNgZone = new OpaqueToken("ComponentFixtureNoNgZone"); export var ComponentFixtureNoNgZone = new OpaqueToken("ComponentFixtureNoNgZone");

View File

@ -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 {ViewResolver} from '../index';
import {Map} from '../src/facade/collection'; import {Map} from '../src/facade/collection';
import {isPresent, stringify, isBlank, isArray} from '../src/facade/lang'; import {isPresent, stringify, isBlank, isArray} from '../src/facade/lang';
import {AnimationEntryMetadata, resolveForwardRef} from '@angular/core';
@Injectable() @Injectable()
export class MockViewResolver extends ViewResolver { export class MockViewResolver extends ViewResolver {

View File

@ -13,10 +13,7 @@ import {
ViewChildrenMetadata, ViewChildrenMetadata,
ViewQueryMetadata, ViewQueryMetadata,
QueryMetadata, QueryMetadata,
} from '@angular/core'; Provider,
import {ReflectorReader} from './core_private';
import {Provider} from '@angular/core';
import {
HostMetadata, HostMetadata,
OptionalMetadata, OptionalMetadata,
InjectableMetadata, InjectableMetadata,
@ -24,6 +21,7 @@ import {
SkipSelfMetadata, SkipSelfMetadata,
InjectMetadata, InjectMetadata,
} from "@angular/core"; } 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 * The host of the static resolver is expected to be able to provide module metadata in the form of

View File

@ -21,6 +21,7 @@ import * as provider_util from './src/di/provider_util';
import * as console from './src/console'; import * as console from './src/console';
import {Provider} from './index'; import {Provider} from './index';
import * as reflection from './src/reflection/reflection'; import * as reflection from './src/reflection/reflection';
// tslint:disable-next-line
import {Reflector} from './src/reflection/reflection'; import {Reflector} from './src/reflection/reflection';
import { import {

View File

@ -1,6 +1,5 @@
import {isPresent} from '../facade/lang'; import {isPresent, scheduleMicroTask} from '../facade/lang';
import {NoOpAnimationPlayer, AnimationPlayer} from './animation_player'; import {NoOpAnimationPlayer, AnimationPlayer} from './animation_player';
import {scheduleMicroTask} from '../facade/lang';
export class AnimationSequencePlayer implements AnimationPlayer { export class AnimationSequencePlayer implements AnimationPlayer {
private _currentIndex: number = 0; private _currentIndex: number = 0;

View File

@ -1,5 +1,5 @@
import {ConnectionBackend, Connection} from '../interfaces'; import {ConnectionBackend, Connection} from '../interfaces';
import {ReadyState, RequestMethod, ResponseType} from '../enums'; import {ReadyState, RequestMethod, ResponseType, ContentType} from '../enums';
import {Request} from '../static_request'; import {Request} from '../static_request';
import {Response} from '../static_response'; import {Response} from '../static_response';
import {Headers} from '../headers'; import {Headers} from '../headers';
@ -10,7 +10,6 @@ import {isPresent, isString} from '../../src/facade/lang';
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer'; import {Observer} from 'rxjs/Observer';
import {isSuccess, getResponseURL} from '../http_utils'; import {isSuccess, getResponseURL} from '../http_utils';
import {ContentType} from '../enums';
const XSSI_PREFIX = ')]}\',\n'; const XSSI_PREFIX = ')]}\',\n';

View File

@ -1,7 +1,6 @@
import {RequestMethod} from './enums'; import {ContentType, RequestMethod} from './enums';
import {RequestArgs} from './interfaces'; import {RequestArgs} from './interfaces';
import {Headers} from './headers'; import {Headers} from './headers';
import {ContentType} from './enums';
import {URLSearchParams} from './url_search_params'; import {URLSearchParams} from './url_search_params';
import {normalizeMethodName} from './http_utils'; import {normalizeMethodName} from './http_utils';
import {isPresent, StringWrapper} from '../src/facade/lang'; import {isPresent, StringWrapper} from '../src/facade/lang';

View File

@ -18,7 +18,7 @@ import {
ComponentRef ComponentRef
} from "@angular/core"; } from "@angular/core";
import {isBlank, isPresent} from "./facade/lang"; 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 {WebAnimationsDriver} from '../src/dom/web_animations_driver';
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS, PlatformLocation} from "@angular/common"; import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS, PlatformLocation} from "@angular/common";
import {DomSanitizationService, DomSanitizationServiceImpl} from "./security/dom_sanitization_service"; 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 {COMPILER_PROVIDERS, XHR} from "@angular/compiler";
import {CachedXHR} from "./xhr/xhr_cache"; import {CachedXHR} from "./xhr/xhr_cache";
import {XHRImpl} from "./xhr/xhr_impl"; import {XHRImpl} from "./xhr/xhr_impl";
import {reflector} from '../core_private';
export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> = export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =
[{provide: XHR, useClass: CachedXHR}]; [{provide: XHR, useClass: CachedXHR}];

View File

@ -7,7 +7,6 @@ import {
RenderComponentType, RenderComponentType,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
import {RenderDebugInfo} from '../../core_private';
import { import {
isPresent, isPresent,
isBlank, isBlank,
@ -28,7 +27,8 @@ import {
AnimationKeyframe, AnimationKeyframe,
AnimationStyles, AnimationStyles,
AnimationPlayer, AnimationPlayer,
AnimationDriver AnimationDriver,
RenderDebugInfo,
} from '../../core_private'; } from '../../core_private';
import {EventManager} from './events/event_manager'; import {EventManager} from './events/event_manager';

View File

@ -5,7 +5,6 @@ import {
Injectable, Injectable,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
import {RenderDebugInfo} from '../../../core_private';
import {ClientMessageBrokerFactory, FnArg, UiArguments} from '../shared/client_message_broker'; import {ClientMessageBrokerFactory, FnArg, UiArguments} from '../shared/client_message_broker';
import {isPresent, isBlank} from '../../../src/facade/lang'; import {isPresent, isBlank} from '../../../src/facade/lang';
@ -17,7 +16,7 @@ import {MessageBus} from '../shared/message_bus';
import {ObservableWrapper} from '../../../src/facade/async'; import {ObservableWrapper} from '../../../src/facade/async';
import {deserializeGenericEvent} from './event_deserializer'; import {deserializeGenericEvent} from './event_deserializer';
import {AnimationKeyframe, AnimationPlayer, AnimationStyles} from '../../../core_private'; import {AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo} from '../../../core_private';
@Injectable() @Injectable()
export class WebWorkerRootRenderer implements RootRenderer { export class WebWorkerRootRenderer implements RootRenderer {

View File

@ -12,8 +12,7 @@ import {RoutesMetadata, RouteMetadata} from './metadata/metadata';
import {Type, isBlank, isPresent, stringify} from './facade/lang'; import {Type, isBlank, isPresent, stringify} from './facade/lang';
import {ListWrapper, StringMapWrapper} from './facade/collection'; import {ListWrapper, StringMapWrapper} from './facade/collection';
import {PromiseWrapper} from './facade/promise'; import {PromiseWrapper} from './facade/promise';
import {BaseException, ComponentFactory} from '@angular/core'; import {BaseException, ComponentFactory, ComponentResolver} from '@angular/core';
import {ComponentResolver} from '@angular/core';
import {DEFAULT_OUTLET_NAME} from './constants'; import {DEFAULT_OUTLET_NAME} from './constants';
import {reflector} from './core_private'; import {reflector} from './core_private';

View File

@ -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 {RouterOutlet} from './directives/router_outlet';
import {Type, isBlank, isPresent} from './facade/lang'; 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 {EventEmitter, Observable, PromiseWrapper, ObservableWrapper} from './facade/async';
import {StringMapWrapper} from './facade/collection';
import {BaseException} from '@angular/core';
import {RouterUrlSerializer} from './router_url_serializer'; import {RouterUrlSerializer} from './router_url_serializer';
import {CanDeactivate} from './interfaces'; import {CanDeactivate} from './interfaces';
import {recognize} from './recognize'; import {recognize} from './recognize';

View File

@ -1,10 +1,8 @@
import {ComponentResolver} from '@angular/core'; import {ApplicationRef, BaseException, ComponentResolver} from '@angular/core';
import {LocationStrategy, PathLocationStrategy, Location} from '@angular/common'; import {LocationStrategy, PathLocationStrategy, Location} from '@angular/common';
import {Router, RouterOutletMap} from './router'; import {Router, RouterOutletMap} from './router';
import {RouteSegment} from './segments'; import {RouteSegment} from './segments';
import {RouterUrlSerializer, DefaultRouterUrlSerializer} from './router_url_serializer'; import {RouterUrlSerializer, DefaultRouterUrlSerializer} from './router_url_serializer';
import {ApplicationRef} from '@angular/core';
import {BaseException} from '@angular/core';
/** /**
* The Platform agnostic ROUTER PROVIDERS * The Platform agnostic ROUTER PROVIDERS

View File

@ -1,5 +1,6 @@
{ {
"rules": { "rules": {
"duplicateModuleImport": true,
"semicolon": true, "semicolon": true,
"variable-name": false "variable-name": false
} }