Top "Jshint" questions

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

Turning off eslint rule for a specific line

In order to turn off linting rule for a particular line in JSHint we use the following rule: /* jshint ignore:…

javascript jshint eslint
Why does JSHint throw a warning if I am using const?

This is the error I get when using const: <error line="2" column="1" severity="warning" message="&apos;const&…

javascript node.js constants jslint jshint
Should I use JSLint or JSHint JavaScript validation?

I am currently validating my JavaScript against JSLint and making progress on, it's assisting me to write better JavaScript - …

javascript jslint jshint
JSHint and jQuery: '$' is not defined

The following JS: (function() { "use strict"; $("#target").click(function(){ console.log("clicked"); }); }()); Yields: test.js: line 5, col 3, '$' is …

javascript jquery lint jshint
Is there a way to suppress JSHint warning for one given line?

I have a (single) case in my app were eval is used, and I would like to suppress JSHint warning …

jshint
webpack3 jshint-loader does not work

I'm trying to follow this instruction https://webpack.js.org/loaders/jshint-loader/ and get an error: My config file: error …

webpack jshint webpack-3
Disable JSHint warning: Expected an assignment or function call and instead saw an expression

I have the following line: imageUrl && (data.imageUrl = imageUrl); For this line, JSHint complains: Expected an assignment or …

javascript jshint
AngularJS controllers and "use strict"

I recently started using JSHint and it is requiring me to use the function form of "use strict". Since then, …

angularjs jshint use-strict
How to disable the warning 'define' is not defined using JSHint and RequireJS

I uses RequireJS AMD in my project. When i run jshint on my project, it throws error like In AMD …

javascript requirejs amd jshint
Expected an assignment or function call and instead saw an expression

I'm totally cool with this JSLint error. How can I tolerate it? Is there a flag or checkbox for it? …

javascript jslint jshint