Skip to content
This repository was archived by the owner on Apr 11, 2018. It is now read-only.

Commit 87bc42b

Browse files
committed
require es5 (no trailing commas)
closes gh-428
1 parent 6cff764 commit 87bc42b

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

bin/swig.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
/*jslint es5: true */
23

34
var swig = require('../index'),
45
optimist = require('optimist'),

lib/lexer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ var TYPES = {
224224
{
225225
type: TYPES.DOTKEY,
226226
regex: [
227-
/^\.(\w+)/,
227+
/^\.(\w+)/
228228
],
229229
idx: 1
230230
},

scripts/config-lint.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ var options = {
44
browser: false,
55
cap: false,
66
confusion: false,
7-
continue: true,
7+
'continue': true,
88
css: false,
99
debug: false,
1010
devel: false,
1111
eqeq: false,
12-
es5: true,
12+
es5: false,
1313
evil: true,
1414
forin: false,
1515
fragment: false,
@@ -24,7 +24,7 @@ var options = {
2424
plusplus: false,
2525
predef: [
2626
// Mocha
27-
'describe', 'it', 'after', 'afterEach', 'before', 'beforeEach',
27+
'describe', 'it', 'after', 'afterEach', 'before', 'beforeEach'
2828
],
2929
regexp: true,
3030
rhino: false,

tests/filters.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var n = new Swig(),
111111
{ c: 'v|default("tacos")', v: '', e: 'tacos' },
112112
{ c: 'v|default("tacos")', v: undefined, e: 'tacos' },
113113
{ c: 'v|default("tacos")', v: null, e: 'tacos' },
114-
{ c: 'v|default("tacos")', v: false, e: 'tacos' },
114+
{ c: 'v|default("tacos")', v: false, e: 'tacos' }
115115
],
116116
'escape': [
117117
{ c: 'v|escape', v: '<foo>', e: '&lt;foo&gt;' },

tests/tags/for.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var cases = [
2525
{ input: '{% for a,b in b %}{{ a }}{{ b }}{% endfor %}', out: '011223' },
2626
{ input: '{% for a, b in c %}{{ b }}{% endfor %}', out: 'applebanana' },
2727
{ input: '{% for a in d|default(["a"]) %}{{ a }}{% endfor %}', out: 'a' },
28-
{ input: '{% for a in q %}hi{% endfor %}', out: '' },
28+
{ input: '{% for a in q %}hi{% endfor %}', out: '' }
2929
];
3030

3131
describe('Tag: for', function () {

tests/variables.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var cases = {
2929
{ c: '{{ a * 3 }}', e: '3' },
3030
{ c: '{{ a / 3 }}', e: String(1 / 3) },
3131
{ c: '{{ 3 - a }}', e: '2' },
32-
{ c: '{{ a % 3 }}', e: '1' },
32+
{ c: '{{ a % 3 }}', e: '1' }
3333
],
3434
'can include objects': [
3535
{ c: '{{ {0: 1, a: "b"} }}', e: '[object Object]' },
@@ -65,7 +65,7 @@ var cases = {
6565
'can use both notation types': [
6666
{ c: '{{ food.a }}', e: 'tacos' },
6767
{ c: '{{ food["a"] }}', e: 'tacos' },
68-
{ c: '{{ g[0][h.g.i]["c"].b[i] }}', e: 'hi!' },
68+
{ c: '{{ g[0][h.g.i]["c"].b[i] }}', e: 'hi!' }
6969
],
7070
'can do some logical operations': [
7171
{ c: '{{ ap === "apples" }}', e: 'true' },

0 commit comments

Comments
 (0)