This repository was archived by the owner on Jan 13, 2024. It is now read-only.
File tree 6 files changed +24
-24
lines changed
6 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 5
5
* e.g. go get -u github.com/fogleman/primitive
6
6
*/
7
7
module . exports = {
8
- pkg : {
9
- }
10
8
} ;
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ module.exports.parse = function (body) {
333
333
allowImportExportEverywhere : true ,
334
334
allowReturnOutsideFunction : true ,
335
335
ecmaVersion : 8 ,
336
- plugins : [ 'estree' , 'objectRestSpread' , 'asyncGenerators' ]
336
+ plugins : [ 'estree' ]
337
337
} ) ;
338
338
} ;
339
339
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
class AsyncIterator {
4
- constructor ( ) {
5
- this . limit = 5 ;
6
- this . current = 0 ;
7
- }
4
+ constructor ( ) {
5
+ this . limit = 5 ;
6
+ this . current = 0 ;
7
+ }
8
8
9
- next ( ) {
10
- this . current += 1 ;
11
- let done = ( this . current > this . limit ) ;
12
- return Promise . resolve ( {
13
- value : done ? undefined : this . current ,
14
- done
15
- } ) ;
16
- }
9
+ next ( ) {
10
+ this . current += 1 ;
11
+ let done = this . current > this . limit ;
12
+ return Promise . resolve ( {
13
+ value : done ? undefined : this . current ,
14
+ done
15
+ } ) ;
16
+ }
17
17
18
- [ Symbol . asyncIterator ] ( ) { return this ; }
18
+ [ Symbol . asyncIterator ] ( ) {
19
+ return this ;
20
+ }
19
21
}
20
22
21
23
// The function does have an await (in the for-await-of loop), ESLint just doesn't seem to detect it
22
24
/* eslint-disable require-await */
23
25
async function t ( ) {
24
- /* eslint-enable require-await */
25
- let it = new AsyncIterator ( ) ;
26
- for await ( let x of it ) {
27
- console . log ( x ) ;
28
- }
26
+ /* eslint-enable require-await */
27
+ let it = new AsyncIterator ( ) ;
28
+ for await ( let x of it ) {
29
+ console . log ( x ) ;
30
+ }
29
31
}
30
32
31
33
t ( ) ;
Original file line number Diff line number Diff line change 2
2
3
3
var sqip = require ( 'sqip' ) ;
4
4
if ( sqip !== undefined ) {
5
- console . log ( 'ok' ) ;
5
+ console . log ( 'ok' ) ;
6
6
}
Original file line number Diff line number Diff line change 2
2
3
3
var svgo = require ( 'svgo' ) ;
4
4
if ( svgo !== undefined ) {
5
- console . log ( 'ok' ) ;
5
+ console . log ( 'ok' ) ;
6
6
}
Original file line number Diff line number Diff line change 2
2
3
3
var tinify = require ( 'tinify' ) ;
4
4
if ( tinify !== undefined ) {
5
- console . log ( 'ok' ) ;
5
+ console . log ( 'ok' ) ;
6
6
}
You can’t perform that action at this time.
0 commit comments