Skip to content

Commit cd79cf0

Browse files
committed
fix(Lint): Fix tslint warning
1 parent bcc16ae commit cd79cf0

File tree

15 files changed

+31
-36
lines changed

15 files changed

+31
-36
lines changed

demo/app/date-picker/date-picker-demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class DejaDatePickerDemoComponent implements OnInit {
5656
}
5757

5858
public ngOnInit() {
59-
let now: Date = new Date();
59+
const now: Date = new Date();
6060
this.dateMin = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
6161
this.dateMax = new Date(now.getFullYear(), now.getMonth(), now.getDate());
6262
this.theDateSelected = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);

demo/app/home/home.component.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
/* tslint:disable:no-unused-variable */
1+
import { DebugElement } from '@angular/core';
22
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
4-
import { DebugElement } from '@angular/core';
54

65
import { HomeComponent } from './home.component';
76

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"docs:watch": "yarn run docs:build -- -s -w",
2929
"e2e": "ng e2e",
3030
"licensecheck": "license-check",
31-
"lint": "ng lint",
31+
"lint": "ng lint --type-check",
3232
"ng": "ng",
3333
"release:major": "changelog -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin",
3434
"release:minor": "changelog -m && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version minor && git push origin",

src/common/core/clipboard/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export class DejaClipboardModule {
2121
}
2222
}
2323

24-
export * from './clipboard.service';
24+
export * from './clipboard.service';

src/common/core/graphics/rect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class Rect {
127127
return new Rect(this.left, this.top, this.width, this.height);
128128
}
129129

130-
public toClientRect() {
130+
public toClientRect() {
131131
return {
132132
left: this.left,
133133
top: this.top,

src/component/data-grid/data-grid-grouparea/data-grid-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { IDejaGridColumn } from '../data-grid-column/data-grid-column';
1010

11-
export interface IDejaGridGroupsEvent {
11+
export interface IDejaGridGroupsEvent {
1212
originalEvent: Event;
1313
column: IDejaGridColumn;
1414
columns: IDejaGridColumn[];

src/component/date-picker/format-to-mask.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ export const formatToMask = {
6666
ZZ: null,
6767
X: null,
6868
x: null,
69-
};
69+
};

src/component/dragdrop/droppable.directive.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ export class DejaDroppableDirective {
7676
if (this.context.dropcallback) {
7777
const dragInfos = this.clipboardService.get(this.draginfokey) as { [key: string]: any };
7878
if (dragInfos) {
79-
const e = dropEvent as IDejaDropEvent;
80-
e.dragInfo = dragInfos;
81-
e.dragObject = dragInfos[this.objectKey];
82-
e.dragElement = element;
83-
e.itsMe = dragInfos[this.elementKey] === element;
84-
85-
this.context.dropcallback(e);
86-
if (e.defaultPrevented) {
87-
e.dragInfo[this.droppedKey] = true;
79+
const evt = dropEvent as IDejaDropEvent;
80+
evt.dragInfo = dragInfos;
81+
evt.dragObject = dragInfos[this.objectKey];
82+
evt.dragElement = element;
83+
evt.itsMe = dragInfos[this.elementKey] === element;
84+
85+
this.context.dropcallback(evt);
86+
if (evt.defaultPrevented) {
87+
evt.dragInfo[this.droppedKey] = true;
8888
dropEvent.preventDefault();
8989
dragEvent.dataTransfer.dropEffect = 'copy';
9090
} else {
@@ -112,16 +112,16 @@ export class DejaDroppableDirective {
112112
if (this.context.dragovercallback) {
113113
const dragInfos = this.clipboardService.get(this.draginfokey) as { [key: string]: any };
114114
if (dragInfos) {
115-
const e = overEvent as IDejaDropEvent;
116-
e.dragInfo = dragInfos;
117-
e.dragObject = dragInfos[this.objectKey];
118-
e.dragElement = element;
119-
e.itsMe = dragInfos[this.elementKey] === element;
115+
const evt = overEvent as IDejaDropEvent;
116+
evt.dragInfo = dragInfos;
117+
evt.dragObject = dragInfos[this.objectKey];
118+
evt.dragElement = element;
119+
evt.itsMe = dragInfos[this.elementKey] === element;
120120

121-
this.context.dragovercallback(e);
121+
this.context.dragovercallback(evt);
122122
this.lastTarget = overEvent.target;
123-
this.lastAccept = e.defaultPrevented;
124-
if (e.defaultPrevented) {
123+
this.lastAccept = evt.defaultPrevented;
124+
if (evt.defaultPrevented) {
125125
overEvent.preventDefault();
126126
dragEvent.dataTransfer.dropEffect = 'copy';
127127
} else {

src/component/monaco-editor/monaco-editor.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ export class MonacoEditorService {
4646
}
4747
});
4848
}
49-
}
49+
}

src/component/monaco-editor/options/editor-language.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ export class IEditorLanguage {
4343
public static readonly VB = 'vb';
4444
public static readonly XML = 'xml';
4545
public static readonly YAML = 'yaml';
46-
}
46+
}

src/component/mouse-dragdrop/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*/
88

99
import { ModuleWithProviders, NgModule } from '@angular/core';
10+
import { DejaMouseDragDropCursorComponent } from './mouse-dragdrop-cursor.component';
11+
import { DejaMouseDragDropService } from './mouse-dragdrop.service';
1012
import { DejaMouseDraggableDirective } from './mouse-draggable.directive';
1113
import { DejaMouseDroppableDirective } from './mouse-droppable.directive';
12-
import { DejaMouseDragDropService } from './mouse-dragdrop.service';
13-
import { DejaMouseDragDropCursorComponent } from './mouse-dragdrop-cursor.component';
1414

1515
@NgModule({
1616
declarations: [DejaMouseDraggableDirective, DejaMouseDroppableDirective, DejaMouseDragDropCursorComponent],

src/component/snackbar/snackbar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,4 +538,4 @@ export class DejaSnackbarComponent implements OnInit, AfterViewInit, OnDestroy {
538538
easing: 'ease',
539539
} as IAnimation);
540540
}
541-
}
541+
}

src/component/splitter/point.model.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
77
*/
88

9-
/**
10-
* Created by rtr on 22.12.2016.
11-
*/
129
export interface Point {
1310
x: number;
1411
y: number;
15-
}
12+
}

src/component/tiles/tile.class.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class DejaTile implements IDejaTile {
6464
public set color(value: string) {
6565
this._color = value;
6666
}
67-
67+
6868
public get color() {
6969
return this._color;
7070
}

tslint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"use-pipe-transform-interface": true,
112112
"component-class-suffix": true,
113113
"directive-class-suffix": true,
114-
"no-access-missing-member": true,
115114
"invoke-injectable": true
116115
}
117116
}

0 commit comments

Comments
 (0)