Skip to content

Commit

Permalink
chore(lint): replace gulp check-task with tslint no-jasmine-focus rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alfaproject authored and vsavkin committed Oct 28, 2016
1 parent 0a94845 commit e86573b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 61 deletions.
16 changes: 1 addition & 15 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,8 @@ gulp.task('public-api:update', ['build.sh'], (done) => {
.on('close', done);
});

// Checks tests for presence of ddescribe, fdescribe, fit, iit and fails the build if one of the
// focused tests is found.
// Currently xdescribe and xit are _not_ reported as errors since there are a couple of excluded
// tests in our code base.
gulp.task('check-tests', function() {
const ddescribeIit = require('gulp-ddescribe-iit');
return gulp
.src([
'modules/**/*.spec.ts',
'modules/**/*_spec.ts',
])
.pipe(ddescribeIit({allowDisabledTests: true}));
});

// Check the coding standards and programming errors
gulp.task('lint', ['check-tests', 'format:enforce', 'tools:build'], () => {
gulp.task('lint', ['format:enforce', 'tools:build'], () => {
const tslint = require('gulp-tslint');
// Built-in rules are at
// https://github.com/palantir/tslint#supported-rules
Expand Down
2 changes: 2 additions & 0 deletions modules/@angular/examples/testing/ts/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('some component', () => {
// #enddocregion

// #docregion fdescribe
/* tslint:disable-next-line:no-jasmine-focus */
fdescribe('some component', () => {
it('has a test', () => {
// This test will run.
Expand All @@ -43,6 +44,7 @@ describe('another component', () => {

// #docregion fit
describe('some component', () => {
/* tslint:disable-next-line:no-jasmine-focus */
fit('has a test', () => {
// This test will run.
});
Expand Down
18 changes: 0 additions & 18 deletions npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -3416,24 +3416,6 @@
}
}
},
"gulp-ddescribe-iit": {
"version": "1.3.0",
"dev": true,
"dependencies": {
"isarray": {
"version": "1.0.0",
"dev": true
},
"readable-stream": {
"version": "2.0.6",
"dev": true
},
"through2": {
"version": "2.0.1",
"dev": true
}
}
},
"gulp-diff": {
"version": "1.0.0",
"dev": true,
Expand Down
26 changes: 0 additions & 26 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion npm-shrinkwrap.readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ To Remove an existing dependency do the following:
3. ensure that your `node_modules` directory is not stale by running `npm install`
4. run `npm uninstall --save-dev <packagename>@<version|latest>`
5. run `./tools/npm/reshrinkwrap`
6. these steps should change 3 files: `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`.
6. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`.
7. commit changes to these three files and you are done
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"gulp-clang-format": "^1.0.23",
"gulp-connect": "^2.3.1",
"gulp-conventional-changelog": "^1.1.0",
"gulp-ddescribe-iit": "^1.3.0",
"gulp-tslint": "^6.1.1",
"incremental-dom": "^0.4.1",
"jasmine": "^2.4.1",
Expand Down
1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"enforce-copyright-header": true,
"no-duplicate-imports": true,
"no-duplicate-variable": true,
"no-jasmine-focus": true,
"require-internal-with-underscore": true,
"semicolon": [true],
"variable-name": [true, "ban-keywords"]
Expand Down

0 comments on commit e86573b

Please sign in to comment.