Skip to content

Commit

Permalink
chore(build): add codelyzer
Browse files Browse the repository at this point in the history
Closes #717
  • Loading branch information
sebholstein committed Oct 23, 2016
1 parent d836360 commit f71542b
Show file tree
Hide file tree
Showing 26 changed files with 155 additions and 128 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"angular2-template-loader": "^0.5.0",
"awesome-typescript-loader": "^2.2.4",
"clang-format": "1.0.42",
"codelyzer": "^1.0.0-beta.2",
"conventional-changelog": "^1.1.0",
"copy-webpack-plugin": "^3.0.1",
"copyfiles": "^1.0.0",
Expand Down
24 changes: 12 additions & 12 deletions src/core/core-module.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {ModuleWithProviders, NgModule} from '@angular/core';
import { ModuleWithProviders, NgModule } from '@angular/core';

import {SebmGoogleMap} from './directives/google-map';
import {SebmGoogleMapCircle} from './directives/google-map-circle';
import {SebmGoogleMapInfoWindow} from './directives/google-map-info-window';
import {SebmGoogleMapMarker} from './directives/google-map-marker';
import {SebmGoogleMapPolygon} from './directives/google-map-polygon';
import {SebmGoogleMapPolyline} from './directives/google-map-polyline';
import {SebmGoogleMapPolylinePoint} from './directives/google-map-polyline-point';
import {LazyMapsAPILoader} from './services/maps-api-loader/lazy-maps-api-loader';
import {LAZY_MAPS_API_CONFIG, LazyMapsAPILoaderConfigLiteral} from './services/maps-api-loader/lazy-maps-api-loader';
import {MapsAPILoader} from './services/maps-api-loader/maps-api-loader';
import {BROWSER_GLOBALS_PROVIDERS} from './utils/browser-globals';
import { SebmGoogleMap } from './directives/google-map';
import { SebmGoogleMapCircle } from './directives/google-map-circle';
import { SebmGoogleMapInfoWindow } from './directives/google-map-info-window';
import { SebmGoogleMapMarker } from './directives/google-map-marker';
import { SebmGoogleMapPolygon } from './directives/google-map-polygon';
import { SebmGoogleMapPolyline } from './directives/google-map-polyline';
import { SebmGoogleMapPolylinePoint } from './directives/google-map-polyline-point';
import { LazyMapsAPILoader } from './services/maps-api-loader/lazy-maps-api-loader';
import { LAZY_MAPS_API_CONFIG, LazyMapsAPILoaderConfigLiteral } from './services/maps-api-loader/lazy-maps-api-loader';
import { MapsAPILoader } from './services/maps-api-loader/maps-api-loader';
import { BROWSER_GLOBALS_PROVIDERS } from './utils/browser-globals';

/**
* @internal
Expand Down
12 changes: 6 additions & 6 deletions src/core/directives/google-map-circle.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Directive, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChange} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';
import { Directive, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChange } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';

import {MouseEvent} from '../map-types';
import {LatLng, LatLngBounds, LatLngLiteral} from '../services/google-maps-types';
import {MouseEvent as MapMouseEvent} from '../services/google-maps-types';
import {CircleManager} from '../services/managers/circle-manager';
import { MouseEvent } from '../map-types';
import { LatLng, LatLngBounds, LatLngLiteral } from '../services/google-maps-types';
import { MouseEvent as MapMouseEvent } from '../services/google-maps-types';
import { CircleManager } from '../services/managers/circle-manager';

@Directive({
selector: 'sebm-google-map-circle',
Expand Down
12 changes: 6 additions & 6 deletions src/core/directives/google-map-info-window.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Component, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChange} from '@angular/core';
import { Component, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChange, OnInit } from '@angular/core';

import {InfoWindowManager} from '../services/managers/info-window-manager';
import { InfoWindowManager } from '../services/managers/info-window-manager';

import {SebmGoogleMapMarker} from './google-map-marker';
import { SebmGoogleMapMarker } from './google-map-marker';

let infoWindowId = 0;

Expand All @@ -11,8 +11,8 @@ let infoWindowId = 0;
*
* ### Example
* ```typescript
* import {Component} from 'angular2/core';
* import {SebmGoogleMap, SebmGoogleMapMarker, SebmGoogleMapInfoWindow} from
* import { Component } from 'angular2/core';
* import { SebmGoogleMap, SebmGoogleMapMarker, SebmGoogleMapInfoWindow } from
* 'angular2-google-maps/core';
*
* @Component({
Expand Down Expand Up @@ -44,7 +44,7 @@ let infoWindowId = 0;
</div>
`
})
export class SebmGoogleMapInfoWindow implements OnDestroy, OnChanges {
export class SebmGoogleMapInfoWindow implements OnDestroy, OnChanges, OnInit {
/**
* The latitude position of the info window (only usefull if you use it ouside of a {@link
* SebmGoogleMapMarker}).
Expand Down
14 changes: 7 additions & 7 deletions src/core/directives/google-map-marker.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {AfterContentInit, ContentChild, Directive, EventEmitter, OnChanges, OnDestroy, SimpleChange} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';
import { AfterContentInit, ContentChild, Directive, EventEmitter, OnChanges, OnDestroy, SimpleChange } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';

import {MouseEvent} from '../map-types';
import { MouseEvent } from '../map-types';
import * as mapTypes from '../services/google-maps-types';
import {MarkerManager} from '../services/managers/marker-manager';
import { MarkerManager } from '../services/managers/marker-manager';

import {SebmGoogleMapInfoWindow} from './google-map-info-window';
import { SebmGoogleMapInfoWindow } from './google-map-info-window';

let markerId = 0;

Expand All @@ -14,8 +14,8 @@ let markerId = 0;
*
* ### Example
* ```typescript
* import {Component} from 'angular2/core';
* import {SebmGoogleMap, SebmGoogleMapMarker} from 'angular2-google-maps/core';
* import { Component } from 'angular2/core';
* import { SebmGoogleMap, SebmGoogleMapMarker } from 'angular2-google-maps/core';
*
* @Component({
* selector: 'my-map-cmp',
Expand Down
14 changes: 7 additions & 7 deletions src/core/directives/google-map-polygon.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {AfterContentInit, Directive, EventEmitter, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';
import { AfterContentInit, Directive, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';

import {LatLng, LatLngLiteral, PolyMouseEvent, PolygonOptions} from '../services/google-maps-types';
import {PolygonManager} from '../services/managers/polygon-manager';
import { LatLng, LatLngLiteral, PolyMouseEvent, PolygonOptions } from '../services/google-maps-types';
import { PolygonManager } from '../services/managers/polygon-manager';

/**
* SebmGoogleMapPolygon renders a polygon on a {@link SebmGoogleMap}
*
* ### Example
* ```typescript
* import {Component} from '@angular/core';
* import {SebmGoogleMap, SebmGooglePolygon, LatLngLiteral} from 'angular2-maps/core';
* import { Component } from '@angular/core';
* import { SebmGoogleMap, SebmGooglePolygon, LatLngLiteral } from 'angular2-maps/core';
*
* @Component({
* selector: 'my-map-cmp',
Expand Down Expand Up @@ -55,7 +55,7 @@ import {PolygonManager} from '../services/managers/polygon-manager';
* ```
*/
@Directive({
selector: 'semb-map-polygon',
selector: 'sebm-map-polygon',
inputs: [
'clickable',
'draggable: polyDraggable',
Expand Down
4 changes: 2 additions & 2 deletions src/core/directives/google-map-polyline-point.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Directive, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';
import {LatLngLiteral} from '../../core/services/google-maps-types';
import { Directive, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import { LatLngLiteral } from '../../core/services/google-maps-types';

/**
* SebmGoogleMapPolylinePoint represents one element of a polyline within a {@link
Expand Down
14 changes: 7 additions & 7 deletions src/core/directives/google-map-polyline.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {AfterContentInit, ContentChildren, Directive, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChanges} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';
import { AfterContentInit, ContentChildren, Directive, EventEmitter, OnChanges, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';

import {PolyMouseEvent} from '../services/google-maps-types';
import {PolylineManager} from '../services/managers/polyline-manager';
import { PolyMouseEvent } from '../services/google-maps-types';
import { PolylineManager } from '../services/managers/polyline-manager';

import {SebmGoogleMapPolylinePoint} from './google-map-polyline-point';
import { SebmGoogleMapPolylinePoint } from './google-map-polyline-point';

let polylineId = 0;
/**
* SebmGoogleMapPolyline renders a polyline on a {@link SebmGoogleMap}
*
* ### Example
* ```typescript
* import {Component} from 'angular2/core';
* import {SebmGoogleMap, SebmGooglePolyline, SebmGooglePolylinePoint} from
* import { Component } from 'angular2/core';
* import { SebmGoogleMap, SebmGooglePolyline, SebmGooglePolylinePoint } from
* 'angular2-google-maps/core';
*
* @Component({
Expand Down
30 changes: 15 additions & 15 deletions src/core/directives/google-map.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {Component, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChange} from '@angular/core';
import {Subscription} from 'rxjs/Subscription';

import {MouseEvent} from '../map-types';
import {GoogleMapsAPIWrapper} from '../services/google-maps-api-wrapper';
import {LatLng, LatLngLiteral} from '../services/google-maps-types';
import {LatLngBounds, LatLngBoundsLiteral, MapTypeStyle} from '../services/google-maps-types';
import {CircleManager} from '../services/managers/circle-manager';
import {InfoWindowManager} from '../services/managers/info-window-manager';
import {MarkerManager} from '../services/managers/marker-manager';
import {PolygonManager} from '../services/managers/polygon-manager';
import {PolylineManager} from '../services/managers/polyline-manager';
import { Component, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChange, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';

import { MouseEvent } from '../map-types';
import { GoogleMapsAPIWrapper } from '../services/google-maps-api-wrapper';
import { LatLng, LatLngLiteral } from '../services/google-maps-types';
import { LatLngBounds, LatLngBoundsLiteral, MapTypeStyle } from '../services/google-maps-types';
import { CircleManager } from '../services/managers/circle-manager';
import { InfoWindowManager } from '../services/managers/info-window-manager';
import { MarkerManager } from '../services/managers/marker-manager';
import { PolygonManager } from '../services/managers/polygon-manager';
import { PolylineManager } from '../services/managers/polyline-manager';

/**
* SebMGoogleMap renders a Google Map.
Expand All @@ -18,8 +18,8 @@ import {PolylineManager} from '../services/managers/polyline-manager';
*
* ### Example
* ```typescript
* import {Component} from '@angular/core';
* import {SebmGoogleMap} from 'angular2-google-maps/core';
* import { Component } from '@angular/core';
* import { SebmGoogleMap } from 'angular2-google-maps/core';
*
* @Component({
* selector: 'my-map-cmp',
Expand Down Expand Up @@ -68,7 +68,7 @@ import {PolylineManager} from '../services/managers/polyline-manager';
</div>
`
})
export class SebmGoogleMap implements OnChanges, OnInit {
export class SebmGoogleMap implements OnChanges, OnInit, OnDestroy {
/**
* The longitude that defines the center of the map.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/core/map-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LatLngLiteral} from './services/google-maps-types';
import { LatLngLiteral } from './services/google-maps-types';

// exported map types
export {LatLngBounds, LatLngBoundsLiteral, LatLngLiteral, PolyMouseEvent} from './services/google-maps-types';
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/google-maps-api-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Injectable, NgZone} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';

import * as mapTypes from './google-maps-types';
import {Polyline} from './google-maps-types';
import {PolylineOptions} from './google-maps-types';
import {MapsAPILoader} from './maps-api-loader/maps-api-loader';
import { Polyline } from './google-maps-types';
import { PolylineOptions } from './google-maps-types';
import { MapsAPILoader } from './maps-api-loader/maps-api-loader';

// todo: add types for this
declare var google: any;
Expand Down
10 changes: 5 additions & 5 deletions src/core/services/managers/circle-manager.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Injectable, NgZone} from '@angular/core';
import { Injectable, NgZone } from '@angular/core';

import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';

import {SebmGoogleMapCircle} from '../../directives/google-map-circle';
import {GoogleMapsAPIWrapper} from '../google-maps-api-wrapper';
import { SebmGoogleMapCircle } from '../../directives/google-map-circle';
import { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';
import * as mapTypes from '../google-maps-types';

@Injectable()
Expand Down
10 changes: 5 additions & 5 deletions src/core/services/managers/info-window-manager.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Injectable, NgZone} from '@angular/core';
import { Injectable, NgZone } from '@angular/core';

import {SebmGoogleMapInfoWindow} from '../../directives/google-map-info-window';
import { SebmGoogleMapInfoWindow } from '../../directives/google-map-info-window';

import {GoogleMapsAPIWrapper} from '../google-maps-api-wrapper';
import {InfoWindow, InfoWindowOptions} from '../google-maps-types';
import {MarkerManager} from './marker-manager';
import { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';
import { InfoWindow, InfoWindowOptions } from '../google-maps-types';
import { MarkerManager } from './marker-manager';

@Injectable()
export class InfoWindowManager {
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/managers/marker-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {NgZone} from '@angular/core';
import {TestBed, async, inject} from '@angular/core/testing';
import { NgZone } from '@angular/core';
import { TestBed, async, inject } from '@angular/core/testing';

import {SebmGoogleMapMarker} from './../../directives/google-map-marker';
import {GoogleMapsAPIWrapper} from './../google-maps-api-wrapper';
import {Marker} from './../google-maps-types';
import {MarkerManager} from './../managers/marker-manager';
import { SebmGoogleMapMarker } from './../../directives/google-map-marker';
import { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';
import { Marker } from './../google-maps-types';
import { MarkerManager } from './../managers/marker-manager';

describe('MarkerManager', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/managers/marker-manager.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Injectable, NgZone} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';

import {SebmGoogleMapMarker} from './../../directives/google-map-marker';
import { SebmGoogleMapMarker } from './../../directives/google-map-marker';

import {GoogleMapsAPIWrapper} from './../google-maps-api-wrapper';
import {Marker} from './../google-maps-types';
import { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';
import { Marker } from './../google-maps-types';

@Injectable()
export class MarkerManager {
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/managers/polygon-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {NgZone} from '@angular/core';
import {TestBed, inject} from '@angular/core/testing';
import { NgZone } from '@angular/core';
import { TestBed, inject } from '@angular/core/testing';

import {SebmGoogleMapPolygon} from '../../directives/google-map-polygon';
import {GoogleMapsAPIWrapper} from '../google-maps-api-wrapper';
import {Polygon} from '../google-maps-types';
import {PolygonManager} from './polygon-manager';
import { SebmGoogleMapPolygon } from '../../directives/google-map-polygon';
import { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';
import { Polygon } from '../google-maps-types';
import { PolygonManager } from './polygon-manager';

describe('PolygonManager', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/managers/polygon-manager.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Injectable, NgZone} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';

import {SebmGoogleMapPolygon} from '../../directives/google-map-polygon';
import {GoogleMapsAPIWrapper} from '../google-maps-api-wrapper';
import {Polygon} from '../google-maps-types';
import { SebmGoogleMapPolygon } from '../../directives/google-map-polygon';
import { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';
import { Polygon } from '../google-maps-types';

@Injectable()
export class PolygonManager {
Expand Down
12 changes: 6 additions & 6 deletions src/core/services/managers/polyline-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {NgZone} from '@angular/core';
import {TestBed, inject} from '@angular/core/testing';
import { NgZone } from '@angular/core';
import { TestBed, inject } from '@angular/core/testing';

import {SebmGoogleMapPolyline} from '../../directives/google-map-polyline';
import {GoogleMapsAPIWrapper} from '../../services/google-maps-api-wrapper';
import {Polyline} from '../../services/google-maps-types';
import {PolylineManager} from '../../services/managers/polyline-manager';
import { SebmGoogleMapPolyline } from '../../directives/google-map-polyline';
import { GoogleMapsAPIWrapper } from '../../services/google-maps-api-wrapper';
import { Polyline } from '../../services/google-maps-types';
import { PolylineManager } from '../../services/managers/polyline-manager';

describe('PolylineManager', () => {
beforeEach(() => {
Expand Down
14 changes: 7 additions & 7 deletions src/core/services/managers/polyline-manager.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Injectable, NgZone} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Observer} from 'rxjs/Observer';
import { Injectable, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';

import {SebmGoogleMapPolyline} from '../../directives/google-map-polyline';
import {SebmGoogleMapPolylinePoint} from '../../directives/google-map-polyline-point';
import {GoogleMapsAPIWrapper} from '../google-maps-api-wrapper';
import {LatLngLiteral, Polyline} from '../google-maps-types';
import { SebmGoogleMapPolyline } from '../../directives/google-map-polyline';
import { SebmGoogleMapPolylinePoint } from '../../directives/google-map-polyline-point';
import { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';
import { LatLngLiteral, Polyline } from '../google-maps-types';

@Injectable()
export class PolylineManager {
Expand Down
Loading

0 comments on commit f71542b

Please sign in to comment.