From ddf0e84070b9b4888167669cd2be5d29a74eaa55 Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sat, 18 Apr 2015 09:40:36 +0200 Subject: [PATCH 1/2] Update lint packages --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 16db2246..371fd466 100644 --- a/package.json +++ b/package.json @@ -102,10 +102,10 @@ }, "devDependencies": { "babel": "5.1.*", - "babel-eslint": "^2.0.2", + "babel-eslint": "^3.0.1", "coveralls": "^2.11.2", "dateformat": "^1.0.11", - "eslint": "^0.18.0", + "eslint": "^0.19.0", "istanbul": "^0.3.13", "jsesc": "^0.5.0", "jshint": "^2.6.3", From 20c51ef22392fbbe7a5f41184cb2ae680be735d3 Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sat, 18 Apr 2015 09:44:29 +0200 Subject: [PATCH 2/2] Fix some variables shadowing --- src/annotation/annotations/alias.js | 6 ++---- src/recurse.js | 6 +++--- src/utils.js | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/annotation/annotations/alias.js b/src/annotation/annotations/alias.js index 82541ecf..b5fa03d2 100644 --- a/src/annotation/annotations/alias.js +++ b/src/annotation/annotations/alias.js @@ -12,13 +12,11 @@ export default function alias(env) { return; } - let alias = item.alias; let name = item.context.name; - - let aliasedItem = Array.find(data, i => i.context.name === alias); + let aliasedItem = Array.find(data, i => i.context.name === item.alias); if (aliasedItem === undefined) { - env.logger.warn(`Item \`${name}\` is an alias of \`${alias}\` but this item doesn't exist.`); + env.logger.warn(`Item \`${name}\` is an alias of \`${item.alias}\` but this item doesn't exist.`); delete item.alias; return; } diff --git a/src/recurse.js b/src/recurse.js index ffa60e4f..977d47b0 100644 --- a/src/recurse.js +++ b/src/recurse.js @@ -30,10 +30,10 @@ export default function recurse() { let pattern = path.resolve(file.path, '**/*.+(sass|scss)'); vfs.src(pattern) - .pipe(through.obj((file, enc, cb) => { + .pipe(through.obj((_file, _enc, _cb) => { // Append to "parent" stream. - this.push(file); - cb(); + this.push(_file); + _cb(); }, () => { // All done. cb(); diff --git a/src/utils.js b/src/utils.js index 7dc768bf..df92d6bb 100644 --- a/src/utils.js +++ b/src/utils.js @@ -11,13 +11,13 @@ export const splitNamespace = value => value.split(ns); export function denodeify(fn) { return function (...args) { return new Promise((resolve, reject) => { - fn(...args, (err, ...args) => { + fn(...args, (err, ...cbargs) => { if (err) { reject(err); return; } - resolve(...args); + resolve(...cbargs); }); }); };