File tree 7 files changed +24
-8
lines changed
7 files changed +24
-8
lines changed Original file line number Diff line number Diff line change
1
+ coverage
2
+ node_modules
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends": "standard"
3
+ }
Original file line number Diff line number Diff line change 15
15
- node_modules
16
16
before_install :
17
17
# Setup Node.js version-specific dependencies
18
- - " test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
18
+ - " test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev eslint eslint-config-standard eslint-plugin-promise eslint-plugin-standard istanbul"
19
19
20
20
# Update Node.js modules
21
21
- " test ! -d node_modules || npm prune"
@@ -24,5 +24,6 @@ script:
24
24
# Run test script, depending on istanbul install
25
25
- " test ! -z $(npm -ps ls istanbul) || npm test"
26
26
- " test -z $(npm -ps ls istanbul) || npm run-script test-travis"
27
+ - " test -z $(npm -ps ls eslint ) || npm run-script lint"
27
28
after_script :
28
29
- " test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ module.exports = unpipe
18
18
* @private
19
19
*/
20
20
21
- function hasPipeDataListeners ( stream ) {
21
+ function hasPipeDataListeners ( stream ) {
22
22
var listeners = stream . listeners ( 'data' )
23
23
24
24
for ( var i = 0 ; i < listeners . length ; i ++ ) {
@@ -37,7 +37,7 @@ function hasPipeDataListeners(stream) {
37
37
* @public
38
38
*/
39
39
40
- function unpipe ( stream ) {
40
+ function unpipe ( stream ) {
41
41
if ( ! stream ) {
42
42
throw new TypeError ( 'argument stream is required' )
43
43
}
Original file line number Diff line number Diff line change 6
6
"license" : " MIT" ,
7
7
"repository" : " stream-utils/unpipe" ,
8
8
"devDependencies" : {
9
+ "eslint" : " 2.10.2" ,
10
+ "eslint-config-standard" : " 5.3.1" ,
11
+ "eslint-plugin-promise" : " 1.1.0" ,
12
+ "eslint-plugin-standard" : " 1.3.2" ,
9
13
"istanbul" : " 0.4.3" ,
10
14
"mocha" : " 2.4.5" ,
11
15
"readable-stream" : " 2.1.2"
20
24
"node" : " >= 0.8"
21
25
},
22
26
"scripts" : {
27
+ "lint" : " eslint **/*.js" ,
23
28
"test" : " mocha --reporter spec --bail --check-leaks test/" ,
24
29
"test-cov" : " istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" ,
25
30
"test-travis" : " istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
Original file line number Diff line number Diff line change
1
+ {
2
+ "env": {
3
+ "mocha": true
4
+ }
5
+ }
Original file line number Diff line number Diff line change @@ -159,29 +159,29 @@ describe('unpipe(stream)', function () {
159
159
} )
160
160
} )
161
161
162
- function SlowOldStream ( ) {
162
+ function SlowOldStream ( ) {
163
163
stream . Stream . call ( this )
164
164
}
165
165
166
166
util . inherits ( SlowOldStream , stream . Stream )
167
167
168
- function SlowReadStream ( ) {
168
+ function SlowReadStream ( ) {
169
169
stream . Readable . call ( this )
170
170
}
171
171
172
172
util . inherits ( SlowReadStream , stream . Readable )
173
173
174
- SlowReadStream . prototype . _read = function _read ( ) {
174
+ SlowReadStream . prototype . _read = function _read ( ) {
175
175
setTimeout ( this . push . bind ( this , '.' ) , 1000 )
176
176
}
177
177
178
- function SlowWriteStream ( ) {
178
+ function SlowWriteStream ( ) {
179
179
stream . Writable . call ( this )
180
180
}
181
181
182
182
util . inherits ( SlowWriteStream , stream . Writable )
183
183
184
- SlowWriteStream . prototype . _write = function _write ( chunk , encoding , callback ) {
184
+ SlowWriteStream . prototype . _write = function _write ( chunk , encoding , callback ) {
185
185
this . emit ( 'write' )
186
186
setTimeout ( callback , 1000 )
187
187
}
You can’t perform that action at this time.
0 commit comments