Top "Jshint" questions

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

setup pre-commit hook jshint

I recently started a project on github. I've managed to setup automatic testing after each commit using Travis. But now …

git github jshint pre-commit-hook
In Javascript, is it OK to put the ternary operator's `?` on then next line?

I really like aligning the ? and the : of my ternary operator when they don't fit on a line, like this: …

javascript jshint
How do I configure jshint to not give me the error "Bad line breaking before"?

It's giving me the error "Bad line breaking before ','" because I have code like the following var one = 1 , …

javascript jshint
jshint expects the new 'prefix' for functions

CSiginIn, CSignUp, CTryIt, CBlocks are all functions declared as such function CSignIn(){//stuff here} yet JSHint says that I am …

javascript jshint
gulp-jshint: How to fail the build?

I want my Gulp build to fail, if there are errors in JSHint. According to the documentation of gulp-jshint I …

gulp jshint
How do I specify the path to node in SublimeText3 for Sublime-JSHint plugin in Windows

After installing node.js then the Sublime-JSHint plugin on Windows XP with SublimeText3, I get the following error: "Node.js …

sublimetext3 jshint
Does jshint understand Angular?

jshint is throwing an error when defining an angular module (or directive, or factory) as recommended by the Angular style …

javascript angularjs jshint
JSHint (r10): 'angular' is not defined

I have the following: angular.module('test') .controller('TestMenuController', [ '$http', '$scope', '$resource', '$state', 'os', 'us', function ( $…

visual-studio angularjs jshint
JSHint silence "Variable is defined but never used"

I want to silence the JSHint warning "attrs is defined but never used" for the variable attrs. However I do …

javascript jshint
Visual Studio Code Error - Failed to load jshint library

Every time Visual Studio Code started or loaded it shows an error message: "Failed to load jshint library. Please install …

javascript visual-studio-code jshint