Top "Jslint" questions

JSLint is a "code quality" tool for JavaScript developed by Douglas Crockford, a well-known developer also responsible for JSON, JSMin, ADSafe and parts of YUI.

JSLint: control comments (selective ignore)

Does JSLint have anything like JavaScript Lint's control comments (e.g. /*jsl:fallthru*/) to make it ignore certain passages?

javascript jslint lint
Jquery and Jslint - '$' was used before it was defined

I have some third party javascript im working with, I added some jquery code into it the javascript file. But …

javascript jquery jslint
Prevent JSHint warning that 'functionName is defined but never used'

I have just started using JSHint (through the Sublime-Linter package for Sublime Text 2). I would like to suppress its warnings …

javascript jquery jslint jshint
lint warning: parseInt missing radix parameter

I have the following code that gives the warning described in the title: year: parseInt(dateParts[0]), ......................^ Any help is much …

javascript jslint
Angular-cli : Using ng lint

I'm aware the angular-cli uses codelyzer which uses lint.js When using the command: ng lint Can it automatically fix …

jslint angular-cli
JSLint: Using a function before it's defined error

I'm using JSLint to verify most of my external Javascript files, but the largest amount of errors I'm getting is …

javascript jslint
Immediate function invocation syntax

There is a JSLint option, one of The Good Parts in fact, that "[requires] parens around immediate invocations," meaning that …

javascript syntax jslint iife
What is the correct way to check if a global variable exists?

JSLint is not passing this as a valid code: /* global someVar: false */ if (typeof someVar === "undefined") { var someVar = "hi!"; } What …

javascript global-variables jslint
JSLint mixed spaces and tabs error

I have run the following through JSLint: $(document).ready(function() { /* Add paragraph on page load */ // Get all header elements var …

javascript jquery jslint
How to tell JSLint / JSHint what global variables are already defined

In my project we have some global variables that work as containers: MyProject.MyFreature.someFunction = function() { ... } So then I use …

javascript global-variables jslint jshint