diff --git a/components/steps/nz-steps.spec.ts b/components/steps/nz-steps.spec.ts index b82802b33bd..63e689cbaca 100644 --- a/components/steps/nz-steps.spec.ts +++ b/components/steps/nz-steps.spec.ts @@ -304,13 +304,17 @@ export class NzTestInnerStepTemplateComponent { selector: 'nz-test-step-for', template: ` - + ` }) export class NzTestStepForComponent { steps = [ 1, 2, 3 ]; + trackById(index: number): number { + return index; + } + updateSteps(): void { this.steps.push(4); } diff --git a/components/time-picker/nz-time-value-accessor.directive.ts b/components/time-picker/nz-time-value-accessor.directive.ts index a813ebdc464..5ae774ab5d6 100644 --- a/components/time-picker/nz-time-value-accessor.directive.ts +++ b/components/time-picker/nz-time-value-accessor.directive.ts @@ -12,7 +12,7 @@ export class NzTimeValueAccessorDirective implements ControlValueAccessor { private _onChange: (value: Date) => void; private _onTouch: () => void; - @Input('nzTime') format: string; + @Input() nzTime: string; @HostListener('keyup') keyup(): void { @@ -46,7 +46,7 @@ export class NzTimeValueAccessorDirective implements ControlValueAccessor { } writeValue(value: Date): void { - this.elementRef.nativeElement.value = this.i18n.formatDate(value, this.format); + this.elementRef.nativeElement.value = this.i18n.formatDate(value, this.nzTime); } registerOnChange(fn: (value: Date) => void): void { diff --git a/tslint.json b/tslint.json index 570957a7e30..e1ce0fcfe2f 100644 --- a/tslint.json +++ b/tslint.json @@ -3,7 +3,59 @@ "node_modules/codelyzer" ], "rules": { - "adjacent-overload-signatures": true, + "banana-in-box": true, + "templates-no-negated-async": true, + "no-life-cycle-call": false, + "prefer-output-readonly": false, + "no-conflicting-life-cycle-hooks": false, + "enforce-component-selector": false, + "prefer-inline-decorator": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": false, + "use-view-encapsulation": false, + "no-attribute-parameter-decorator": true, + "no-output-named-after-standard-event": true, + "no-input-rename": true, + "no-output-rename": true, + "no-output-on-prefix": true, + "no-forward-ref": false, + "no-unused-css": true, + "use-life-cycle-interface": true, + "contextual-life-cycle": true, + "trackBy-function": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true, + "pipe-impure": true, + "angular-whitespace": [ + false, + "check-interpolation", + "check-semicolon" + ], + "directive-selector": [ + true, + "attribute", + [ + "nz" + ], + [ + "camelCase", + "kebab-case" + ] + ], + "component-selector": [ + true, + [ + "element", + "attribute" + ], + [ + "nz", + "test" + ], + "kebab-case" + ], "callable-types": true, "class-name": true, "comment-format": [ @@ -202,42 +254,6 @@ "check-type", "check-typecast", "check-preblock" - ], - "directive-selector": [ - true, - "attribute", - [ - "nz" - ], - [ - "camelCase", - "kebab-case" - ] - ], - "component-selector": [ - true, - [ - "element", - "attribute" - ], - [ - "nz", - "test" - ], - "kebab-case" - ], - "angular-whitespace": [ - false, - "check-interpolation", - "check-semicolon" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": false, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true + ] } }