Skip to content

Commit 1dba43d

Browse files
cexbrayathansl
authored andcommitted
chore(lint): bump to tslint 4.2.0 (#3768)
Adds a few rules introduced by tslint 4.1 and 4.2 - [callable-types](https://palantir.github.io/tslint/rules/callable-types/) - [import-blacklist](https://palantir.github.io/tslint/rules/import-blacklist/) - [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/) - [no-empty-interface](https://palantir.github.io/tslint/rules/no-empty-interface/) - [no-inferred-empty-object-type](https://palantir.github.io/tslint/rules/no-inferred-empty-object-type/) - [no-string-throw](https://palantir.github.io/tslint/rules/no-string-throw/) and a rule for codelyzer: - import-destructuring-spacing
1 parent 50d73d2 commit 1dba43d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

packages/angular-cli/blueprints/ng2/files/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"ng": "ng",
88
"start": "ng serve",
9-
"lint": "tslint \"<%= sourceDir %>/**/*.ts\"",
9+
"lint": "tslint \"<%= sourceDir %>/**/*.ts\" --project src/tsconfig.json --type-check",
1010
"test": "ng test",
1111
"pree2e": "webdriver-manager update --standalone false --gecko false",
1212
"e2e": "protractor"
@@ -41,7 +41,7 @@
4141
"karma-remap-istanbul": "^0.2.1",
4242
"protractor": "~4.0.13",
4343
"ts-node": "1.2.1",
44-
"tslint": "^4.0.2",
44+
"tslint": "^4.2.0",
4545
"typescript": "~2.0.3"
4646
}
4747
}

packages/angular-cli/blueprints/ng2/files/tslint.json

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"node_modules/codelyzer"
44
],
55
"rules": {
6+
"callable-types": true,
67
"class-name": true,
78
"comment-format": [
89
true,
@@ -11,10 +12,12 @@
1112
"curly": true,
1213
"eofline": true,
1314
"forin": true,
15+
"import-blacklist": [true, "rxjs"],
1416
"indent": [
1517
true,
1618
"spaces"
1719
],
20+
"interface-over-type-literal": true,
1821
"label-position": true,
1922
"max-line-length": [
2023
true,
@@ -40,10 +43,13 @@
4043
"no-debugger": true,
4144
"no-duplicate-variable": true,
4245
"no-empty": false,
46+
"no-empty-interface": true,
4347
"no-eval": true,
4448
"no-inferrable-types": true,
49+
"no-inferred-empty-object-type": true,
4550
"no-shadowed-variable": true,
4651
"no-string-literal": false,
52+
"no-string-throw": true,
4753
"no-switch-case-fall-through": true,
4854
"no-trailing-whitespace": true,
4955
"no-unused-expression": true,
@@ -100,6 +106,7 @@
100106
"use-pipe-transform-interface": true,
101107
"component-class-suffix": true,
102108
"directive-class-suffix": true,
109+
"import-destructuring-spacing": true,
103110
"no-access-missing-member": true,
104111
"templates-use-public": true,
105112
"invoke-injectable": true

packages/angular-cli/models/webpack-build-test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const getWebpackTestConfig = function (projectRoot, environment, appConfig, test
5858
tslint: {
5959
emitErrors: false,
6060
failOnHint: false,
61-
resourcePath: `./${appConfig.root}`
61+
resourcePath: `./${appConfig.root}`,
62+
typeCheck: true
6263
}
6364
}
6465
}))

0 commit comments

Comments
 (0)