chore(lint): replace gulp check-task with tslint no-jasmine-focus rule

fixes #11800
This commit is contained in:
Joao Dias 2016-10-27 20:57:10 +02:00 committed by vsavkin
parent 0a94845435
commit e86573bac8
7 changed files with 5 additions and 61 deletions

View File

@ -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

View File

@ -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.
@ -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.
});

View File

@ -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,

26
npm-shrinkwrap.json generated
View File

@ -4960,32 +4960,6 @@
}
}
},
"gulp-ddescribe-iit": {
"version": "1.3.0",
"from": "gulp-ddescribe-iit@latest",
"resolved": "https://registry.npmjs.org/gulp-ddescribe-iit/-/gulp-ddescribe-iit-1.3.0.tgz",
"dev": true,
"dependencies": {
"isarray": {
"version": "1.0.0",
"from": "isarray@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"dev": true
},
"readable-stream": {
"version": "2.0.6",
"from": "readable-stream@>=2.0.0 <2.1.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"dev": true
},
"through2": {
"version": "2.0.1",
"from": "through2@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz",
"dev": true
}
}
},
"gulp-diff": {
"version": "1.0.0",
"from": "gulp-diff@>=1.0.0 <2.0.0",

View File

@ -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

View File

@ -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",

View File

@ -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"]