Top "Jshint" questions

A community-driven tool to detect errors and potential problems in JavaScript code and to enforce coding conventions.

SublimeLinter 3 Not Working

I've been having some problems with SublimeLinter3. I recently installed JSHint and Sublime Linter 3 with my package control, and when …

sublimetext3 jshint sublimelinter
jshint throws a"Expected a 'break' statement before 'case'"

Hi I am having a trouble when my framework is using jshint to validate my javascript code. I have used …

javascript jshint
jsHint "myFunction is defined but never used"

I am reviewing my javascript with JsHint, and it always returns an error, saying that a function is never used. …

javascript jshint
Why is Jshint saying "variable already defined" in this if statement?

I have this code: if ( something is true ) { var someVar = true; } else { var someVar = false; } JsHint is saying that "someVar …

javascript jshint
Is it bad practice to use the same variable name in multiple for-loops?

I was just linting some JavaScript code using JSHint. In the code I have two for-loops both used like this: …

javascript for-loop jslint jshint
Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function

I have the following code: if (typeof console === "object" && typeof console.error === "function") { function e(msg) {"use strict"; …

javascript jslint jshint
JSHint thinks Jasmine functions are undefined

I've got a Grunt setup which uses Karma+Jasmine and JSHint. Whenever I run JSHint on my spec file, I …

javascript gruntjs jasmine karma-runner jshint
Suppressing Semicolon Warnings in JSHint with Gulp

I am currently using JSHint with my Gulp workflow, and would like to suppress the semicolon errors when working with …

javascript twitter-bootstrap gulp jshint
Sublime Text 3 SublimeLinter plugin not able to find jshint

For some reason, SublimeLinter3, or the SublimeLinter3 JSHint linter plugin, seems unable to parse the PATH environment variable and is …

sublimetext3 jshint sublimelinter
grunt-contrib-jshint ignores has no effect

I would like to exclude libs directory from being lint'ed. However, ignores in options and planted .jshintignore file in project …

gruntjs jshint