Skip to content

Commit

Permalink
build: replace forbidden-identifiers with tslint (#3579)
Browse files Browse the repository at this point in the history
* Replaces the big `forbidden-identifiers` script with TSLint rules.

Closes #2175
  • Loading branch information
devversion authored and mmalerba committed Mar 13, 2017
1 parent 7ffaf9e commit 06fd08d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 209 deletions.
202 changes: 0 additions & 202 deletions scripts/ci/forbidden-identifiers.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ViewportRuler, VIEWPORT_RULER_PROVIDER} from './viewport-ruler';
import {OverlayPositionBuilder} from './overlay-position-builder';
import {ConnectedOverlayPositionChange} from './connected-position';
import {Scrollable} from '../scroll/scrollable';
import {Subscription} from 'rxjs';
import {Subscription} from 'rxjs/Subscription';
import {TestBed, inject} from '@angular/core/testing';
import Spy = jasmine.Spy;
import {SCROLL_DISPATCHER_PROVIDER} from '../scroll/scroll-dispatcher';
Expand Down
6 changes: 1 addition & 5 deletions tools/gulp/tasks/ci.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import {task} from 'gulp';


task('ci:lint', ['ci:forbidden-identifiers', 'lint']);

task('ci:forbidden-identifiers', function() {
require('../../../scripts/ci/forbidden-identifiers.js');
});
task('ci:lint', ['lint']);

// Travis sometimes does not exit the process and times out. This is to prevent that.
task('ci:test', ['test:single-run'], () => process.exit(0));
Expand Down
9 changes: 8 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"no-shadowed-variable": true,
"no-unused-expression": true,
"no-unused-var": [true, {"ignore-pattern": "^(_.*)$"}],
"no-debugger": true,
"one-line": [
true,
"check-catch",
Expand Down Expand Up @@ -62,6 +63,12 @@
"check-operator",
"check-separator",
"check-type"
]
],
// Bans jasmine helper functions that will prevent the CI from properly running tests.
"ban": [true, ["fit"], ["fdescribe"], ["xit"], ["xdescribe"]],
// Disallows importing the whole RxJS library. Submodules can be still imported.
"import-blacklist": [true, "rxjs"],
// Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks.
"linebreak-style": [true, "LF"]
}
}

0 comments on commit 06fd08d

Please sign in to comment.