Skip to content

Commit 737ded1

Browse files
committed
Correct linting errors
1 parent c7a3453 commit 737ded1

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ function gulpRename(obj) {
3333

3434
} else if (type === "object" && obj !== undefined && obj !== null) {
3535

36-
var dirname = 'dirname' in obj ? obj.dirname : parsedPath.dirname,
36+
var dirname = "dirname" in obj ? obj.dirname : parsedPath.dirname,
3737
prefix = obj.prefix || "",
3838
suffix = obj.suffix || "",
39-
basename = 'basename' in obj ? obj.basename : parsedPath.basename,
40-
extname = 'extname' in obj ? obj.extname : parsedPath.extname;
39+
basename = "basename" in obj ? obj.basename : parsedPath.basename,
40+
extname = "extname" in obj ? obj.extname : parsedPath.extname;
4141

4242
path = Path.join(dirname, prefix + basename + suffix + extname);
4343

@@ -54,9 +54,9 @@ function gulpRename(obj) {
5454
}
5555

5656
callback(null, file);
57-
}
57+
};
5858

5959
return stream;
60-
};
60+
}
6161

6262
module.exports = gulpRename;

test/path-parsing.spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,39 @@ describe("gulp-rename path parsing", function () {
2626
});
2727
});
2828

29-
var dirname_helper = function (srcPattern, expectedPath) {
29+
var dirnameHelper = function (srcPattern) {
3030
it("dirname is path from directory glob to file", function (done) {
3131
var obj = function (path) {
3232
path.dirname.should.match(/^fixtures[0-9]?$/);
3333
};
3434
helper(srcPattern, obj, null, done);
3535
});
36-
}
36+
};
3737

3838
context("when src pattern matches a directory with *", function () {
39-
dirname_helper("test/*/*.min.txt");
39+
dirnameHelper("test/*/*.min.txt");
4040
});
4141

4242
context("when src pattern matches a directory with **", function () {
43-
dirname_helper("test/**/*.min.txt");
43+
dirnameHelper("test/**/*.min.txt");
4444
});
4545

4646
context("when src pattern matches a directory with [...]", function () {
47-
dirname_helper("test/fixt[a-z]res/*.min.txt");
47+
dirnameHelper("test/fixt[a-z]res/*.min.txt");
4848
});
4949

5050
/* SKIP: glob2base does not handle brace expansion as expected. See wearefractal/glob2base#1 */
5151
context.skip("when src pattern matches a directory with {...,...}", function () {
52-
dirname_helper("test/f{ri,ixtur}es/*.min.txt");
52+
dirnameHelper("test/f{ri,ixtur}es/*.min.txt");
5353
});
5454

5555
/* SKIP: glob2base does not handle brace expansion as expected. See wearefractal/glob2base#1 */
5656
context.skip("when src pattern matches a directory with {#..#}", function () {
57-
dirname_helper("test/fixtures{0..9}/*.min.txt");
57+
dirnameHelper("test/fixtures{0..9}/*.min.txt");
5858
});
5959

6060
context("when src pattern matches a directory with an extglob", function () {
61-
dirname_helper("test/f+(ri|ixtur)es/*.min.txt");
61+
dirnameHelper("test/f+(ri|ixtur)es/*.min.txt");
6262
});
6363

6464
/* requires glob-stream >= 3.1.0 */

test/rename.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe("gulp-rename", function () {
165165
it("receives object with extname even if a different value is returned", function (done) {
166166
var obj = function (path) {
167167
path.extname.should.equal(".txt");
168-
return path.extname = ".md";
168+
path.extname = ".md";
169169
};
170170
var expectedPath = "test/fixtures/hello.md";
171171
helper(srcPattern, obj, expectedPath, done);

0 commit comments

Comments
 (0)