Remove unused vars and add jshint checking
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import Exception from "../exception";
|
||||
|
||||
var AST = {
|
||||
Program: function(statements, blockParams, strip, locInfo) {
|
||||
this.loc = locInfo;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,3 +1,4 @@
|
||||
/*jshint unused: false */
|
||||
function Visitor() {}
|
||||
|
||||
Visitor.prototype = {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/*jshint -W004 */
|
||||
import SafeString from "./safe-string";
|
||||
|
||||
var escape = {
|
||||
"&": "&",
|
||||
"<": "<",
|
||||
|
||||
@@ -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.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user