Skip to content

Commit b526063

Browse files
committed
Fix JSHint compatibility (consistent quotes, missing "use strict" statement).
Also remove obsolete version numbers from individual files.
1 parent 8e38f69 commit b526063

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

.jshintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"noempty" : true, // true: Prohibit use of empty blocks
1414
"nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
1515
"plusplus" : false, // true: Prohibit use of `++` & `--`
16-
"quotmark" : "single", // Quotation mark consistency:
16+
"quotmark" : true, // Quotation mark consistency:
1717
// false : do nothing (default)
1818
// true : ensure whatever is used is consistent
1919
// "single" : require single quotes

css/demo.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Templates Demo CSS 2.4.0
2+
* JavaScript Templates Demo CSS
33
* https://github.com/blueimp/JavaScript-Templates
44
*
55
* Copyright 2013, Sebastian Tschan

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<!--
33
/*
4-
* JavaScript Templates Demo 2.4.0
4+
* JavaScript Templates Demo
55
* https://github.com/blueimp/JavaScript-Templates
66
*
77
* Copyright 2011, Sebastian Tschan
@@ -76,7 +76,7 @@ <h4>Features</h4>
7676
</script>
7777
<script src="js/tmpl.js"></script>
7878
<!-- jQuery is not required by JavaScript Templates, but included for the demo -->
79-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
79+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
8080
<script src="js/demo.js"></script>
81-
</body>
81+
</body>
8282
</html>

js/compile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
/*
3-
* JavaScript Templates Compiler 2.4.0
3+
* JavaScript Templates Compiler
44
* https://github.com/blueimp/JavaScript-Templates
55
*
66
* Copyright 2011, Sebastian Tschan
@@ -53,7 +53,7 @@
5353
if (index > 1) {
5454
stats = fs.statSync(file);
5555
if (!stats.isFile()) {
56-
console.error(file + ' is not a file.');
56+
console.error(file + " is not a file.");
5757
return;
5858
}
5959
content = fs.readFileSync(file, "utf8");
@@ -74,7 +74,7 @@
7474
}
7575
});
7676
if (!list.length) {
77-
console.error('Missing input file.');
77+
console.error("Missing input file.");
7878
return;
7979
}
8080
// Combine the generated functions as cache of the minimal runtime:

js/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Templates Demo JS 2.4.0
2+
* JavaScript Templates Demo
33
* https://github.com/blueimp/JavaScript-Templates
44
*
55
* Copyright 2013, Sebastian Tschan

js/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Templates Runtime 2.4.1
2+
* JavaScript Templates Runtime
33
* https://github.com/blueimp/JavaScript-Templates
44
*
55
* Copyright 2011, Sebastian Tschan
@@ -9,10 +9,10 @@
99
* http://www.opensource.org/licenses/MIT
1010
*/
1111

12-
/*jslint sloppy: true */
1312
/*global define */
1413

1514
(function ($) {
15+
"use strict";
1616
var tmpl = function (id, data) {
1717
var f = tmpl.cache[id];
1818
return data ? f(data, tmpl) : function (data) {

js/tmpl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Templates 2.4.1
2+
* JavaScript Templates
33
* https://github.com/blueimp/JavaScript-Templates
44
*
55
* Copyright 2011, Sebastian Tschan
@@ -12,7 +12,7 @@
1212
* http://ejohn.org/blog/javascript-micro-templating/
1313
*/
1414

15-
/*jslint evil: true, regexp: true, unparam: true */
15+
/*jshint evil: true */
1616
/*global document, define */
1717

1818
(function ($) {
@@ -21,7 +21,7 @@
2121
var f = !/[^\w\-\.:]/.test(str) ? tmpl.cache[str] = tmpl.cache[str] ||
2222
tmpl(tmpl.load(str)) :
2323
new Function(
24-
tmpl.arg + ',tmpl',
24+
tmpl.arg + ",tmpl",
2525
"var _e=tmpl.encode" + tmpl.helper + ",_s='" +
2626
str.replace(tmpl.regexp, tmpl.func) +
2727
"';return _s;"

test/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<!--
33
/*
4-
* JavaScript Templates Test 2.5.0
4+
* JavaScript Templates Test
55
* https://github.com/blueimp/JavaScript-Templates
66
*
77
* Copyright 2011, Sebastian Tschan
@@ -19,11 +19,11 @@
1919
<meta charset="utf-8">
2020
<title>JavaScript Templates Test</title>
2121
<meta name="viewport" content="width=device-width, initial-scale=1.0">
22-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.2.5/mocha.min.css">
22+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.3.4/mocha.min.css">
2323
</head>
2424
<body>
2525
<div id="mocha"></div>
26-
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.2.5/mocha.min.js"></script>
26+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.3.4/mocha.min.js"></script>
2727
<script src="https://cdnjs.cloudflare.com/ajax/libs/expect.js/0.2.0/expect.min.js"></script>
2828
<script>
2929
mocha.setup('bdd');

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* JavaScript Templates Test 2.4.2
2+
* JavaScript Templates Test
33
* https://github.com/blueimp/JavaScript-Templates
44
*
55
* Copyright 2011, Sebastian Tschan

0 commit comments

Comments
 (0)