Skip to content

Commit 25b4d93

Browse files
cexbrayatmgechev
authored andcommitted
feat(@angular-devkit/build-angular): support TSLint 6.0+
TSLint [6.0.0-beta0](https://github.com/palantir/tslint/releases/tag/6.0.0-beta0) was released, and `ng lint` throws with: TSLint must be version 5.5 or higher. if we try to use it in a CLI project. It looks like the current version check allows v5.5+ by checking that both the major and minor versions are > 5. So this fails with 6.0 (but would succeed with 6.5). This fixes the check to allow using v6.0.
1 parent 7d8ebbd commit 25b4d93

File tree

1 file changed

+5
-1
lines changed
  • packages/angular_devkit/build_angular/src/tslint

1 file changed

+5
-1
lines changed

packages/angular_devkit/build_angular/src/tslint/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ async function _loadTslint() {
3131
}
3232

3333
const version = tslint.Linter.VERSION && tslint.Linter.VERSION.split('.');
34-
if (!version || version.length < 2 || Number(version[0]) < 5 || Number(version[1]) < 5) {
34+
if (
35+
!version || version.length < 2
36+
|| (Number(version[0]) === 5 && Number(version[1]) < 5) // 5.5+
37+
|| Number(version[0]) < 5 // 6.0+
38+
) {
3539
throw new Error('TSLint must be version 5.5 or higher.');
3640
}
3741

0 commit comments

Comments
 (0)