Remove unused vars and add jshint checking

This commit is contained in:
kpdecker
2014-12-01 01:32:41 -06:00
parent 0d396ccd30
commit 203df9d5b7
8 changed files with 4 additions and 10 deletions
+1
View File
@@ -45,6 +45,7 @@
"plusplus": false,
"regexp": false,
"undef": true,
"unused": true,
"sub": true,
"strict": false,
"white": false
-2
View File
@@ -1,5 +1,3 @@
import Exception from "../exception";
var AST = {
Program: function(statements, blockParams, strip, locInfo) {
this.loc = locInfo;
+1 -3
View File
@@ -18,8 +18,6 @@ function scopedId(path) {
// an ID is simple if it only has one part, and that part is not
// `..` or `this`.
function simpleId(path) {
var part = path.parts[0];
return path.parts.length === 1 && !scopedId(path) && !path.depth;
}
@@ -93,7 +91,7 @@ Compiler.prototype = {
compileProgram: function(program) {
var result = new this.compiler().compile(program, this.options);
var guid = this.guid++, depth;
var guid = this.guid++;
this.usePartial = this.usePartial || result.usePartial;
@@ -755,7 +755,6 @@ JavaScriptCompiler.prototype = {
replaceStack: function(callback) {
var prefix = ['('],
inline = this.isInline(),
stack,
createdStack,
usedLiteral;
+1 -1
View File
@@ -127,7 +127,7 @@ PrintVisitor.prototype.BooleanLiteral = function(bool) {
PrintVisitor.prototype.Hash = function(hash) {
var pairs = hash.pairs;
var joinedPairs = [], left, right;
var joinedPairs = [];
for (var i=0, l=pairs.length; i<l; i++) {
joinedPairs.push(this.accept(pairs[i]));
+1
View File
@@ -1,3 +1,4 @@
/*jshint unused: false */
function Visitor() {}
Visitor.prototype = {
-2
View File
@@ -1,6 +1,4 @@
/*jshint -W004 */
import SafeString from "./safe-string";
var escape = {
"&": "&amp;",
"<": "&lt;",
-1
View File
@@ -13,7 +13,6 @@ module.exports.cli = function(opts) {
return;
}
var template = [0];
if (!opts.templates.length) {
throw new Handlebars.Exception('Must define at least one template or directory.');
}