Fix lint erorrs, fix typescript version

This commit is contained in:
Roman Hotsiy 2016-06-15 21:48:04 +03:00
parent 1fafa5e334
commit 854c831154
11 changed files with 29 additions and 32 deletions

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import { Component, ElementRef, ViewContainerRef } from '@angular/core'; import { Component, ElementRef, ViewContainerRef, OnDestroy, AfterViewInit } from '@angular/core';
import { CORE_DIRECTIVES } from '@angular/common'; import { CORE_DIRECTIVES } from '@angular/common';
import { DynamicComponentLoader, Input } from '@angular/core'; import { DynamicComponentLoader, Input } from '@angular/core';
@ -17,7 +17,7 @@ var cache = {};
template: '', template: '',
directives: [CORE_DIRECTIVES] directives: [CORE_DIRECTIVES]
}) })
export class JsonSchemaLazy { export class JsonSchemaLazy implements OnDestroy, AfterViewInit {
@Input() pointer: string; @Input() pointer: string;
@Input() auto: boolean; @Input() auto: boolean;
@Input() isRequestSchema: boolean; @Input() isRequestSchema: boolean;

View File

@ -43,10 +43,10 @@
<div class="param-description" innerHtml="{{prop.description | marked}}"></div> <div class="param-description" innerHtml="{{prop.description | marked}}"></div>
<div class="discriminator-info" *ngIf="prop.isDiscriminator"> <div class="discriminator-info" *ngIf="prop.isDiscriminator">
<span>This field value determines the exact schema:</span> <span>This field value determines the exact schema:</span>
<dropdown (change)="selectDerived($event)"> <drop-down (change)="selectDerived($event)">
<option *ngFor="let derived of schema.derived; let i=index" <option *ngFor="let derived of schema.derived; let i=index"
[value]="i">{{derived.name}}</option> [value]="i">{{derived.name}}</option>
</dropdown> </drop-down>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -1,6 +1,7 @@
'use strict'; 'use strict';
import { provide, enableProdMode, ElementRef, ComponentRef } from '@angular/core'; import { provide, enableProdMode, ElementRef,
ComponentRef, AfterViewInit } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic'; import { bootstrap } from '@angular/platform-browser-dynamic';
import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter'; import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter';
import { RedocComponent, BaseComponent } from '../base'; import { RedocComponent, BaseComponent } from '../base';
@ -33,7 +34,7 @@ var _modeLocked = false;
detect: true, detect: true,
onPushOnly: false onPushOnly: false
}) })
export class Redoc extends BaseComponent { export class Redoc extends BaseComponent implements AfterViewInit {
static appRef: ComponentRef<any>; static appRef: ComponentRef<any>;
options: any; options: any;

View File

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import { Component, ChangeDetectionStrategy } from '@angular/core'; import { Component, ChangeDetectionStrategy, OnInit, OnDestroy } from '@angular/core';
import { CORE_DIRECTIVES, JsonPipe, AsyncPipe } from '@angular/common'; import { CORE_DIRECTIVES, JsonPipe, AsyncPipe } from '@angular/common';
import { SchemaManager } from '../utils/SchemaManager'; import { SchemaManager } from '../utils/SchemaManager';
import JsonPointer from '../utils/JsonPointer'; import JsonPointer from '../utils/JsonPointer';
@ -94,7 +94,7 @@ export function RedocComponent(options) {
* Generic Component * Generic Component
* @class * @class
*/ */
export class BaseComponent { export class BaseComponent implements OnInit, OnDestroy {
componentSchema: any = null; componentSchema: any = null;
pointer: String; pointer: String;

View File

@ -1,11 +1,11 @@
'use strict'; 'use strict';
import {Component, EventEmitter, ElementRef, Output} from '@angular/core'; import { Component, EventEmitter, ElementRef, Output, AfterContentInit } from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common'; import { CORE_DIRECTIVES } from '@angular/common';
import DropKick from 'dropkickjs'; import DropKick from 'dropkickjs';
@Component({ @Component({
selector: 'dropdown', selector: 'drop-down',
template: ` template: `
<select (change)=onChange($event.target.value)> <select (change)=onChange($event.target.value)>
<ng-content></ng-content> <ng-content></ng-content>
@ -14,7 +14,7 @@ import DropKick from 'dropkickjs';
directives: [CORE_DIRECTIVES], directives: [CORE_DIRECTIVES],
styleUrls: ['./drop-down.css'] styleUrls: ['./drop-down.css']
}) })
export class DropDown { export class DropDown implements AfterContentInit {
@Output() change = new EventEmitter(); @Output() change = new EventEmitter();
elem: any; elem: any;
inst: any; inst: any;

View File

@ -1,13 +1,12 @@
'use strict'; 'use strict';
import {Directive, ElementRef, Input} from '@angular/core'; import { Directive, ElementRef, Input, OnInit, OnDestroy } from '@angular/core';
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';
@Directive({ @Directive({
selector: '[sticky-sidebar]', selector: '[sticky-sidebar]'
inputs: ['scrollParent', 'scrollYOffset']
}) })
export class StickySidebar { export class StickySidebar implements OnInit, OnDestroy {
$element: any; $element: any;
cancelScrollBinding: any; cancelScrollBinding: any;
$redocEl: any; $redocEl: any;

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
import { getChildDebugElement, getChildDebugElementAll } from '../../../../tests/helpers'; import { getChildDebugElement, getChildDebugElementAll } from '../../../../tests/helpers';
import {Component} from '@angular/core'; import { Component } from '@angular/core';
import { import {
inject, inject,

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output, OnInit } from '@angular/core';
import { CORE_DIRECTIVES } from '@angular/common'; import { CORE_DIRECTIVES } from '@angular/common';
import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
@ -17,7 +17,7 @@ import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
styleUrls: ['tabs.css'], styleUrls: ['tabs.css'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class Tabs { export class Tabs implements OnInit {
@Input() selected: any; @Input() selected: any;
@Output() change = new EventEmitter(); @Output() change = new EventEmitter();
tabs: Tab[] = []; tabs: Tab[] = [];

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
import {Component, EventEmitter, Output, Input} from '@angular/core'; import { Component, EventEmitter, Output, Input } from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common'; import { CORE_DIRECTIVES } from '@angular/common';
@Component({ @Component({
selector: 'zippy', selector: 'zippy',

View File

@ -93,7 +93,6 @@
}, },
"devDependencies": { "devDependencies": {
"@angular/common": "^2.0.0-rc.1", "@angular/common": "^2.0.0-rc.1",
"@angular/compiler-cli": "^0.2.0",
"@angular/compiler": "^2.0.0-rc.1", "@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1", "@angular/core": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1", "@angular/platform-browser": "^2.0.0-rc.1",
@ -121,7 +120,9 @@
"istanbul": "github:gotwarlost/istanbul#source-map", "istanbul": "github:gotwarlost/istanbul#source-map",
"jasmine-core": "^2.4.1", "jasmine-core": "^2.4.1",
"jasmine-spec-reporter": "^2.4.0", "jasmine-spec-reporter": "^2.4.0",
"json-pointer": "^0.5.0",
"json-schema-instantiator": "^0.3.0", "json-schema-instantiator": "^0.3.0",
"json-schema-ref-parser": "^3.1.2",
"jspm": "^0.16.36", "jspm": "^0.16.36",
"karma": "^0.13.15", "karma": "^0.13.15",
"karma-babel-preprocessor": "^5.2.2", "karma-babel-preprocessor": "^5.2.2",
@ -136,29 +137,27 @@
"karma-regex-preprocessor": "github:makern/karma-regex-preprocessor", "karma-regex-preprocessor": "github:makern/karma-regex-preprocessor",
"karma-should": "^1.0.0", "karma-should": "^1.0.0",
"karma-sinon": "^1.0.4", "karma-sinon": "^1.0.4",
"marked": "^0.3.5",
"node-sass": "^3.7.0", "node-sass": "^3.7.0",
"openapi-sampler": "^0.1.2", "openapi-sampler": "^0.1.2",
"phantomjs-prebuilt": "^2.1.7", "phantomjs-prebuilt": "^2.1.7",
"protractor": "^3.0.0", "protractor": "^3.0.0",
"reflect-metadata": "^0.1.2", "reflect-metadata": "^0.1.2",
"require-dir": "^0.3.0", "require-dir": "^0.3.0",
"rollup-plugin-commonjs": "^2.2.1",
"run-sequence": "^1.1.5", "run-sequence": "^1.1.5",
"rxjs": "^5.0.0-beta.6",
"rxjs-es": "^5.0.0-beta.7", "rxjs-es": "^5.0.0-beta.7",
"scrollparent": "^1.0.0",
"shelljs": "^0.7.0", "shelljs": "^0.7.0",
"should": "^8.0.2", "should": "^8.0.2",
"sinon": "^1.17.2", "sinon": "^1.17.2",
"systemjs-builder": "^0.15.16", "systemjs-builder": "^0.15.16",
"tslint": "^3.11.0", "tslint": "^3.11.0",
"tslint-stylish": "^2.1.0-beta", "tslint-stylish": "^2.1.0-beta",
"typescript": "^1.9.0-dev.20160612-1.0", "typescript": "^1.8.10",
"vinyl-paths": "^2.0.0", "vinyl-paths": "^2.0.0",
"yargs": "^4.7.1", "yargs": "^4.7.1",
"zone.js": "^0.6.12", "zone.js": "^0.6.12"
"scrollparent": "^1.0.0",
"json-pointer": "^0.5.0",
"json-schema-ref-parser": "^3.1.2",
"marked": "^0.3.5",
"rollup-plugin-commonjs": "^2.2.1",
"rxjs": "^5.0.0-beta.6"
} }
} }

View File

@ -36,8 +36,6 @@
], ],
"variable-name": false, "variable-name": false,
"directive-selector-name": [true, "camelCase"],
"component-selector-name": [true, "kebab-case"],
"directive-selector-type": [true, "attribute"], "directive-selector-type": [true, "attribute"],
"component-selector-type": [true, "element"], "component-selector-type": [true, "element"],
"use-input-property-decorator": true, "use-input-property-decorator": true,