Skip to content

Commit 63140e0

Browse files
committed
lint
1 parent 052dcee commit 63140e0

File tree

9 files changed

+20
-30
lines changed

9 files changed

+20
-30
lines changed

test/array.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require('mocha');
44
var assert = require('assert');
55
var hbs = require('handlebars').create();
66
var helpers = require('..');
7-
helpers.array({handlebars: hbs})
7+
helpers.array({handlebars: hbs});
88
helpers.string({handlebars: hbs});
99

1010
var context = {array: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']};
@@ -362,7 +362,7 @@ describe('array', function() {
362362

363363
it('should sort the items in an array', function() {
364364
var fn = hbs.compile('{{sortBy array}}');
365-
assert.equal(fn({array: ["b", "c", "a"]}), 'a,b,c');
365+
assert.equal(fn({array: ['b', 'c', 'a']}), 'a,b,c');
366366
});
367367

368368
it('should return an empty string when the array is invalid:', function() {

test/code.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('code', function() {
3535
'',
3636
'[Click here](http://assemble.io) for more documentation.',
3737
'',
38-
'```\n',
38+
'```\n'
3939
].join('\n'));
4040
});
4141

@@ -54,7 +54,7 @@ describe('code', function() {
5454
' </body>',
5555
'</html>',
5656
'',
57-
'```\n',
57+
'```\n'
5858
].join('\n'));
5959
});
6060
});

test/fs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var assert = require('assert');
77
var hbs = require('handlebars').create();
88
require('..')({handlebars: hbs});
99

10-
var orig;
1110
var libFiles = fs.readdirSync(path.join(__dirname, '../lib'))
1211
.map(function(fp) {
1312
return path.join('lib', fp);

test/html.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('html', function() {
5151
assert.equal(hbs.compile('{{{css styles}}}')(ctx), [
5252
'<link type="text/css" rel="stylesheet" href="a.css">',
5353
'<link type="text/css" rel="stylesheet" href="bcss">',
54-
'<link type="text/css" rel="stylesheet" href="c.css">',
54+
'<link type="text/css" rel="stylesheet" href="c.css">'
5555
].join('\n'));
5656
});
5757

@@ -80,7 +80,7 @@ describe('html', function() {
8080
assert.equal(hbs.compile('{{{js scripts}}}')(ctx), [
8181
'<script src="a.js"></script>',
8282
'<script src="bjs"></script>',
83-
'<script src="c.js"></script>',
83+
'<script src="c.js"></script>'
8484
].join('\n'));
8585
});
8686

@@ -137,7 +137,7 @@ describe('html', function() {
137137
'<img alt="Picture of a placeholder" src="http://placehold.it/200x200/0eafff/ffffff.png" width="200" height="200">',
138138
'</a>',
139139
'<figcaption>My new caption!</figcaption>',
140-
'</figure>',
140+
'</figure>'
141141
].join('\n');
142142
assert.equal(fn(context), comparison);
143143
});
@@ -223,12 +223,12 @@ describe('html', function() {
223223
};
224224
var fn = hbs.compile(source);
225225
var comparison = [
226-
'<figure id="image-id">',
227-
'<a href="http://placehold.it/600x400/0eafff/ffffff.png" rel="thumbnail" class="test">',
228-
'<img alt="Picture of a placeholder" src="http://placehold.it/200x200/0eafff/ffffff.png" width="200" height="200">',
229-
'</a>',
230-
'<figcaption>My new caption!</figcaption>',
231-
'</figure>',
226+
'<figure id="image-id">',
227+
'<a href="http://placehold.it/600x400/0eafff/ffffff.png" rel="thumbnail" class="test">',
228+
'<img alt="Picture of a placeholder" src="http://placehold.it/200x200/0eafff/ffffff.png" width="200" height="200">',
229+
'</a>',
230+
'<figcaption>My new caption!</figcaption>',
231+
'</figure>'
232232
].join('\n');
233233
assert.equal(fn(context), comparison);
234234
});

test/match.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('matching', function() {
1818
});
1919

2020
it('should take an array of patterns', function() {
21-
var ctx = {files: testFiles, patterns: ['(a|u)*.js', 'f*.js']}
21+
var ctx = {files: testFiles, patterns: ['(a|u)*.js', 'f*.js']};
2222
var fn = hbs.compile('{{match files patterns}}');
2323
assert.equal(fn(ctx), 'array.js,url.js,utils.js,fs.js');
2424
});

test/object.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('object', function() {
9494
});
9595
it('should return a `get` compatible path', function() {
9696
var fn = hbs.compile('{{get (toPath "a" (add 1 1) "j") this}}');
97-
assert.equal(fn({a: [{b: 'c', d: 'e'},{f: 'g', h: 'i'}, {j: 'k', l: 'm'}]}), 'k');
97+
assert.equal(fn({a: [{b: 'c', d: 'e'}, {f: 'g', h: 'i'}, {j: 'k', l: 'm'}]}), 'k');
9898
});
9999
});
100100

@@ -164,7 +164,7 @@ describe('object', function() {
164164
describe('JSONparse', function() {
165165
it('should parse a JSON string:', function() {
166166
var fn = hbs.compile('{{lookup (JSONparse string) "name"}}');
167-
assert.equal(fn({string: "{\"name\": \"Fry\"}"}), 'Fry');
167+
assert.equal(fn({string: '{"name": "Fry"}'}), 'Fry');
168168
});
169169
});
170170

@@ -199,7 +199,7 @@ describe('object', function() {
199199
describe('stringify', function() {
200200
it('should stringify an object:', function() {
201201
var fn = hbs.compile('{{{stringify data}}}');
202-
var res = fn({data: {name: "Halle", age: 4, userid: "Nicole"}});
202+
var res = fn({data: {name: 'Halle', age: 4, userid: 'Nicole'}});
203203
assert.equal(res, '{"name":"Halle","age":4,"userid":"Nicole"}');
204204
});
205205
});

test/string.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,14 @@ describe('string', function() {
297297
});
298298
it('should render "Yes he is", from inside the block.', function() {
299299
var fn = hbs.compile('{{#startsWith "Bender" "Bender is great"}}Yes he is{{/startsWith}}');
300-
assert.equal(fn(), "Yes he is");
300+
assert.equal(fn(), 'Yes he is');
301301
});
302302
it('should render the Inverse block.', function() {
303303
var fn = hbs.compile('{{#startsWith "Goodbye" "Hello, world!"}}Whoops{{else}}Bro, do you even hello world?{{/startsWith}}');
304304
assert.equal(fn(), 'Bro, do you even hello world?');
305305
});
306-
it("should render the Inverse block.", function() {
307-
var fn = hbs.compile('{{#startsWith "myPrefix" nullProperty}}fn block{{else}}inverse block{{/startsWith}}');
306+
it('should render the Inverse block when an undefined value is passed in..', function() {
307+
var fn = hbs.compile('{{#startsWith "myPrefix" undefined}}fn block{{else}}inverse block{{/startsWith}}');
308308
assert.equal(fn(), 'inverse block');
309309
});
310310
});

test/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require('mocha');
44
var assert = require('assert');
55
var HTML = require('../lib/utils/html');
6-
var Handlebars = require('handlebars');
76

87
describe('html', function() {
98
describe('parseAttributes', function() {

verbfile.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,6 @@ function customDocsHelpers(app) {
210210
});
211211
}
212212

213-
function section(name) {
214-
return `## ${name}\n{%= apidocs("lib/${name}.js") %}`;
215-
}
216-
217-
function listItem(file) {
218-
return '- **' + link(file.stem, '#' + file.stem) + '** (code ' + link(file.stem, file.relative) + ')';
219-
}
220-
221213
function codeLink(title, path, start) {
222214
return link(title, path + '#L' + start);
223215
}

0 commit comments

Comments
 (0)