Skip to content

Commit 0884f93

Browse files
committed
updated ts-lint version 4 and related
codelyzer does not recognize parent class. So, I had to disable some lints such as use-life-cycle-interface. mgechev/codelyzer#64
1 parent 93d7083 commit 0884f93

File tree

7 files changed

+280
-66
lines changed

7 files changed

+280
-66
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"angular2-router-loader": "^0.3.3",
6161
"angular2-template-loader": "^0.6.0",
6262
"awesome-typescript-loader": "^2.2.4",
63-
"codelyzer": "^1.0.0-beta.3",
63+
"codelyzer": "^2.0.0-beta.3",
6464
"coveralls": "^2.11.15",
6565
"css-loader": "^0.26.0",
6666
"express": "^4.14.0",
@@ -83,8 +83,8 @@
8383
"source-map-loader": "^0.1.5",
8484
"style-loader": "^0.13.1",
8585
"ts-helpers": "^1.1.2",
86-
"tslint": "^3.15.1",
87-
"tslint-loader": "^2.1.5",
86+
"tslint": "^4.0.2",
87+
"tslint-loader": "^3.3.0",
8888
"typescript": "~2.0.10",
8989
"webpack": ">=2.1.0-beta.27",
9090
"webpack-dev-server": ">=2.1.0-beta.11",

src/app/components/header/header.module.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import {CommonModule} from "@angular/common";
22
import {NgModule} from "@angular/core/src/metadata/ng_module";
3-
import {RouterModule, Routes} from "@angular/router";
3+
import {RouterModule} from "@angular/router";
44
import {SharedModule} from "../../shared";
5-
import {UserListComponent} from "./user-list.component";
65
import {HeaderComponent} from "./header.component";
76

87
@NgModule({

src/app/core/services/profile-data.resolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {UserService} from "./user.service";
99
@Injectable()
1010
export class ProfileDataResolver implements Resolve<any> {
1111

12-
constructor(private userService:UserService) {
12+
constructor(private userService: UserService) {
1313
}
1414

1515
resolve(route:ActivatedRouteSnapshot, state:RouterStateSnapshot) {

src/app/shared/directives/styles.directive.spec.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {Component, DebugElement} from "@angular/core";
2-
import {HelpComponent} from "./help.component";
32
import {TestBed, fakeAsync, ComponentFixture} from "@angular/core/testing";
4-
import {HelpModule} from "./help.module";
53
import {By} from "@angular/platform-browser";
64
import {StylesDirective} from "./styles.directive";
75
import {StyleSheet} from "aphrodite";

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"allowSyntheticDefaultImports": true,
99
"sourceMap": true,
1010
"noEmitHelpers": true,
11+
"noUnusedLocals": true,
1112
"lib": [
1213
"es2015",
1314
"dom"

tslint.json

+19-27
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@
2222
],
2323
"no-arg": true,
2424
"no-construct": true,
25-
"no-duplicate-key": true,
2625
"no-duplicate-variable": true,
2726
"no-empty": false,
2827
"no-eval": true,
2928
"trailing-comma": true,
3029
"no-trailing-whitespace": true,
3130
"no-unused-expression": true,
32-
"no-unused-variable": false,
33-
"no-unreachable": true,
3431
"one-line": [
3532
true,
3633
"check-open-brace",
@@ -52,47 +49,42 @@
5249
"check-operator",
5350
"check-separator"
5451
],
55-
"directive-selector-name": [
52+
"directive-selector": [
5653
true,
54+
"attribute",
55+
[
56+
"mpt"
57+
],
5758
"camelCase"
5859
],
59-
"component-selector-name": [
60+
"component-selector": [
6061
true,
62+
"element",
63+
[
64+
"mpt"
65+
],
6166
"kebab-case"
6267
],
63-
"directive-selector-type": [
64-
true,
65-
"attribute"
66-
],
67-
"component-selector-type": [
68-
true,
69-
"element"
70-
],
71-
"directive-selector-prefix": [
72-
true,
73-
"mpt"
74-
],
75-
"component-selector-prefix": [
76-
true,
77-
"mpt"
78-
],
7968
"use-input-property-decorator": true,
8069
"use-output-property-decorator": true,
8170
"use-host-property-decorator": true,
8271
"no-attribute-parameter-decorator": true,
8372
"no-input-rename": true,
8473
"no-output-rename": true,
8574
"no-forward-ref": true,
86-
"use-life-cycle-interface": true,
75+
"use-life-cycle-interface": false,
8776
"use-pipe-transform-interface": true,
88-
"pipe-naming": [
77+
"component-class-suffix": [
8978
true,
90-
"camelCase"
79+
"Component"
80+
],
81+
"directive-class-suffix": [
82+
true,
83+
"Directive"
9184
],
92-
"component-class-suffix": true,
93-
"directive-class-suffix": true,
85+
"import-destructuring-spacing": false,
9486
"templates-use-public": true,
95-
"no-access-missing-member": true,
87+
"no-access-missing-member": false,
9688
"invoke-injectable": true
9789
}
9890
}

0 commit comments

Comments
 (0)