Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 3890e84

Browse files
committedJan 10, 2019
remove 'asyncGenerators' plugin as unneeded + lint fixes
1 parent 9db59ff commit 3890e84

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed
 

‎dictionary/sqip.js

-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
* e.g. go get -u github.com/fogleman/primitive
66
*/
77
module.exports = {
8-
pkg: {
9-
}
108
};

‎lib/detector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ module.exports.parse = function (body) {
333333
allowImportExportEverywhere: true,
334334
allowReturnOutsideFunction: true,
335335
ecmaVersion: 8,
336-
plugins: [ 'estree', 'objectRestSpread', 'asyncGenerators' ]
336+
plugins: [ 'estree' ]
337337
});
338338
};
339339

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
'use strict';
22

33
class AsyncIterator {
4-
constructor () {
5-
this.limit = 5;
6-
this.current = 0;
7-
}
4+
constructor () {
5+
this.limit = 5;
6+
this.current = 0;
7+
}
88

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+
}
1717

18-
[Symbol.asyncIterator] () { return this; }
18+
[Symbol.asyncIterator] () {
19+
return this;
20+
}
1921
}
2022

2123
// The function does have an await (in the for-await-of loop), ESLint just doesn't seem to detect it
2224
/* eslint-disable require-await */
2325
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+
}
2931
}
3032

3133
t();

‎test/test-79-npm/sqip/sqip.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
var sqip = require('sqip');
44
if (sqip !== undefined) {
5-
console.log('ok');
5+
console.log('ok');
66
}

‎test/test-79-npm/svgo/svgo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
var svgo = require('svgo');
44
if (svgo !== undefined) {
5-
console.log('ok');
5+
console.log('ok');
66
}

‎test/test-79-npm/tinify/tinify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
var tinify = require('tinify');
44
if (tinify !== undefined) {
5-
console.log('ok');
5+
console.log('ok');
66
}

0 commit comments

Comments
 (0)
This repository has been archived.