Skip to content

Commit a4f217e

Browse files
committed
build: replace forbidden-identifiers with tslint
* Replaces the big `forbidden-identifiers` script with TSLint rules. Closes angular#2175
1 parent cdb3763 commit a4f217e

File tree

4 files changed

+10
-209
lines changed

4 files changed

+10
-209
lines changed

scripts/ci/forbidden-identifiers.js

-202
This file was deleted.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {ViewportRuler, VIEWPORT_RULER_PROVIDER} from './viewport-ruler';
44
import {OverlayPositionBuilder} from './overlay-position-builder';
55
import {ConnectedOverlayPositionChange} from './connected-position';
66
import {Scrollable} from '../scroll/scrollable';
7-
import {Subscription} from 'rxjs';
7+
import {Subscription} from 'rxjs/Subscription';
88
import {TestBed, inject} from '@angular/core/testing';
99
import Spy = jasmine.Spy;
1010
import {SCROLL_DISPATCHER_PROVIDER} from '../scroll/scroll-dispatcher';

tools/gulp/tasks/ci.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import {task} from 'gulp';
22

33

4-
task('ci:lint', ['ci:forbidden-identifiers', 'lint']);
5-
6-
task('ci:forbidden-identifiers', function() {
7-
require('../../../scripts/ci/forbidden-identifiers.js');
8-
});
4+
task('ci:lint', ['lint']);
95

106
// Travis sometimes does not exit the process and times out. This is to prevent that.
117
task('ci:test', ['test:single-run'], () => process.exit(0));

tslint.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"no-shadowed-variable": true,
2626
"no-unused-expression": true,
2727
"no-unused-var": [true, {"ignore-pattern": "^(_.*)$"}],
28+
"no-debugger": true,
2829
"one-line": [
2930
true,
3031
"check-catch",
@@ -62,6 +63,12 @@
6263
"check-operator",
6364
"check-separator",
6465
"check-type"
65-
]
66+
],
67+
// Bans jasmine helper functions that will prevent the CI from properly running tests.
68+
"ban": [true, ["fit"], ["fdescribe"], ["xit"], ["xdescribe"]],
69+
// Disallows importing the whole RxJS library. Submodules can be still imported.
70+
"import-blacklist": [true, "rxjs"],
71+
// Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks.
72+
"linebreak-style": [true, "LF"]
6673
}
6774
}

0 commit comments

Comments
 (0)