Skip to content

Commit 48654fc

Browse files
authored
Update eslint-config-wikimedia and lint (#112)
Update linting package and lint files. Add .eslintcache to .gitignore
1 parent 8c19533 commit 48654fc

File tree

8 files changed

+966
-807
lines changed

8 files changed

+966
-807
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
coverage
22
node_modules
33
npm-debug.log
4+
.eslintcache

index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ exports = module.exports = function ( urlOrOpts ) {
3838
return BBPromise.reject( 'No uri supplied in argument' );
3939
} else {
4040
return BBPromise.resolve(
41-
fetch( url, opts ).then( ( response ) => {
42-
return response.text().then( ( body ) => {
43-
return index.parseAll( cheerio.load( body ) );
44-
} );
45-
} )
41+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
42+
fetch( url, opts ).then(
43+
( response ) => response.text().then(
44+
( body ) => index.parseAll( cheerio.load( body ) )
45+
)
46+
)
4647
);
4748
}
4849
};

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ exports.parseAll = function ( chtml ) {
2626
let key; // Key corresponding to location of result
2727
return BBPromise.all( arr.map( ( x ) => x.reflect() ) )
2828
.then( ( results ) => {
29-
Object.keys( results ).forEach( function ( r ) {
29+
Object.keys( results ).forEach( ( r ) => {
3030
result = results[ r ];
3131
key = keys[ r ];
3232
if ( result && result.isFulfilled() && result.value() ) {

0 commit comments

Comments
 (0)