Skip to content

Commit e86573b

Browse files
alfaprojectvsavkin
authored andcommitted
chore(lint): replace gulp check-task with tslint no-jasmine-focus rule
fixes angular#11800
1 parent 0a94845 commit e86573b

File tree

7 files changed

+5
-61
lines changed

7 files changed

+5
-61
lines changed

gulpfile.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,8 @@ gulp.task('public-api:update', ['build.sh'], (done) => {
125125
.on('close', done);
126126
});
127127

128-
// Checks tests for presence of ddescribe, fdescribe, fit, iit and fails the build if one of the
129-
// focused tests is found.
130-
// Currently xdescribe and xit are _not_ reported as errors since there are a couple of excluded
131-
// tests in our code base.
132-
gulp.task('check-tests', function() {
133-
const ddescribeIit = require('gulp-ddescribe-iit');
134-
return gulp
135-
.src([
136-
'modules/**/*.spec.ts',
137-
'modules/**/*_spec.ts',
138-
])
139-
.pipe(ddescribeIit({allowDisabledTests: true}));
140-
});
141-
142128
// Check the coding standards and programming errors
143-
gulp.task('lint', ['check-tests', 'format:enforce', 'tools:build'], () => {
129+
gulp.task('lint', ['format:enforce', 'tools:build'], () => {
144130
const tslint = require('gulp-tslint');
145131
// Built-in rules are at
146132
// https://github.com/palantir/tslint#supported-rules

modules/@angular/examples/testing/ts/testing.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe('some component', () => {
2121
// #enddocregion
2222

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

4445
// #docregion fit
4546
describe('some component', () => {
47+
/* tslint:disable-next-line:no-jasmine-focus */
4648
fit('has a test', () => {
4749
// This test will run.
4850
});

npm-shrinkwrap.clean.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,24 +3416,6 @@
34163416
}
34173417
}
34183418
},
3419-
"gulp-ddescribe-iit": {
3420-
"version": "1.3.0",
3421-
"dev": true,
3422-
"dependencies": {
3423-
"isarray": {
3424-
"version": "1.0.0",
3425-
"dev": true
3426-
},
3427-
"readable-stream": {
3428-
"version": "2.0.6",
3429-
"dev": true
3430-
},
3431-
"through2": {
3432-
"version": "2.0.1",
3433-
"dev": true
3434-
}
3435-
}
3436-
},
34373419
"gulp-diff": {
34383420
"version": "1.0.0",
34393421
"dev": true,

npm-shrinkwrap.json

Lines changed: 0 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm-shrinkwrap.readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ To Remove an existing dependency do the following:
4747
3. ensure that your `node_modules` directory is not stale by running `npm install`
4848
4. run `npm uninstall --save-dev <packagename>@<version|latest>`
4949
5. run `./tools/npm/reshrinkwrap`
50-
6. these steps should change 3 files: `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`.
50+
6. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`.
5151
7. commit changes to these three files and you are done

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"gulp-clang-format": "^1.0.23",
5151
"gulp-connect": "^2.3.1",
5252
"gulp-conventional-changelog": "^1.1.0",
53-
"gulp-ddescribe-iit": "^1.3.0",
5453
"gulp-tslint": "^6.1.1",
5554
"incremental-dom": "^0.4.1",
5655
"jasmine": "^2.4.1",

tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"enforce-copyright-header": true,
88
"no-duplicate-imports": true,
99
"no-duplicate-variable": true,
10+
"no-jasmine-focus": true,
1011
"require-internal-with-underscore": true,
1112
"semicolon": [true],
1213
"variable-name": [true, "ban-keywords"]

0 commit comments

Comments
 (0)