Skip to content

Commit

Permalink
Remove unused vars and add jshint checking
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Dec 16, 2014
1 parent 0d396cc commit 203df9d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"plusplus": false,
"regexp": false,
"undef": true,
"unused": true,
"sub": true,
"strict": false,
"white": false
Expand Down
2 changes: 0 additions & 2 deletions lib/handlebars/compiler/ast.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Exception from "../exception";

var AST = {
Program: function(statements, blockParams, strip, locInfo) {
this.loc = locInfo;
Expand Down
4 changes: 1 addition & 3 deletions lib/handlebars/compiler/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion lib/handlebars/compiler/javascript-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ JavaScriptCompiler.prototype = {

replaceStack: function(callback) {
var prefix = ['('],
inline = this.isInline(),
stack,
createdStack,
usedLiteral;
Expand Down
2 changes: 1 addition & 1 deletion lib/handlebars/compiler/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down
1 change: 1 addition & 0 deletions lib/handlebars/compiler/visitor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jshint unused: false */
function Visitor() {}

Visitor.prototype = {
Expand Down
2 changes: 0 additions & 2 deletions lib/handlebars/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*jshint -W004 */
import SafeString from "./safe-string";

var escape = {
"&": "&amp;",
"<": "&lt;",
Expand Down
1 change: 0 additions & 1 deletion lib/precompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down

0 comments on commit 203df9d

Please sign in to comment.