Skip to content

Commit 902edd0

Browse files
devversiontinayuangao
authored andcommitted
chore: update tslint to latest version (#2952)
* chore: update tslint * Updates TSLint to the latest version. * Due to some breaking changes we had to temporary disable the `no-inferrable-types` rule. Need to revisit once palantir/tslint#2158 is addressed. References #2175 * Use custom tslint rule
1 parent 8b83dcc commit 902edd0

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@
9797
"stylelint": "^7.8.0",
9898
"travis-after-modes": "0.0.7",
9999
"ts-node": "^2.0.0",
100-
"tslint": "^3.13.0",
100+
"tslint": "^4.4.2",
101+
"tslint-no-unused-var": "0.0.6",
101102
"typescript": "~2.0.10",
102103
"uglify-js": "^2.7.5",
103104
"web-animations-js": "^2.2.2"

src/lib/core/overlay/position/connected-position-strategy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type ElementBoundingPositions = {
2121
right: number;
2222
bottom: number;
2323
left: number;
24-
}
24+
};
2525

2626
/**
2727
* A strategy for positioning overlays. Using this strategy, an overlay is given an

src/lib/progress-spinner/progress-spinner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const MAX_ANGLE = 359.99 / 100;
3131
export type ProgressSpinnerMode = 'determinate' | 'indeterminate';
3232

3333
type EasingFn = (currentTime: number, startValue: number,
34-
changeInValue: number, duration: number) => number
34+
changeInValue: number, duration: number) => number;
3535

3636

3737
/**

src/lib/tooltip/tooltip.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export class TooltipComponent {
331331
// trigger interaction and close the tooltip right after it was displayed.
332332
this._closeOnInteraction = false;
333333

334-
// Mark for check so if any parent component has set the
334+
// Mark for check so if any parent component has set the
335335
// ChangeDetectionStrategy to OnPush it will be checked anyways
336336
this._changeDetectorRef.markForCheck();
337337
setTimeout(() => { this._closeOnInteraction = true; }, 0);
@@ -352,7 +352,7 @@ export class TooltipComponent {
352352
this._visibility = 'hidden';
353353
this._closeOnInteraction = false;
354354

355-
// Mark for check so if any parent component has set the
355+
// Mark for check so if any parent component has set the
356356
// ChangeDetectionStrategy to OnPush it will be checked anyways
357357
this._changeDetectorRef.markForCheck();
358358
}, delay);

tslint.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2+
"rulesDirectory": ["node_modules/tslint-no-unused-var"],
23
"rules": {
34
"max-line-length": [true, 100],
4-
"no-inferrable-types": true,
5+
// Disable this flag because of SHA tslint#48b0c597f9257712c7d1f04b55ed0aa60e333f6a
6+
// TSLint now shows warnings if types for properties are inferred. This rule needs to be
7+
// disabled because all properties need to have explicit types set to work for Dgeni.
8+
"no-inferrable-types": false,
59
"class-name": true,
610
"comment-format": [
711
true,
@@ -20,7 +24,7 @@
2024
"no-bitwise": true,
2125
"no-shadowed-variable": true,
2226
"no-unused-expression": true,
23-
"no-unused-variable": [true, {"ignore-pattern": "^(_.*)$"}],
27+
"no-unused-var": [true, {"ignore-pattern": "^(_.*)$"}],
2428
"one-line": [
2529
true,
2630
"check-catch",

0 commit comments

Comments
 (0)