Does the behavior exist if you use the canonical jslint file? The one you linked branched over four years ago, hasn't been updated, and doesn't seem to respect window. Compare this section in the canonical, current JSLint file, which does contain window: https://github.com/douglascrockford/JSLint/blob/master/jslint.js#L343 // browser contains a set of global...

Instead of making a script, you can write an alias with alias jslint='java -jar /usr/local/lib/jslint4java-2.0.5.jar' and every time you use jslint after adding the alias you should get your desired behaviour. Of course, in this case the alias will have no persistence. To make it permanent, add it to ~/.bash_aliases...

Sure! You can use a JSLint directive: /*jslint unparam:true, sloppy:true, white:true, devel:true */ /*global $rootScope*/ $rootScope.$on('$stateChangeSuccess', function (ev, toState, toParams, fromState, fromParams) { // I'm putting in this line so that JSLint doesn't complain about an empty block // and also so that I can mimic your described situation. console.log(toState,...

Looks like the follow-up problem isn't [just?] due to JSLint being in beta. It's because Crockford no longer allows for statements by default. Looks like I'm going to need to set aside a weekend to read the new instructions and source. Strange things are afoot at the Circle K, man....

According to ECMAScript specification: \x00 is valid, under the grammar expansion: Atom -> \ AtomEscape AtomEscape -> CharacterEscape CharacterEscape -> HexEscapeSequence HexEscapeSequence -> x HexDigit HexDigit and the pattern semantic: The production CharacterEscape :: HexEscapeSequence evaluates by evaluating the CV of the HexEscapeSequence (see 7.8.4) and returning its character result....

The issue seems to be that you do not have a ; after the definition of that.setProgressUrl. Changing to: // Set progress url that.setProgressUrl = function (url) { that.progressUrl = url; return this; }; Resolves the reported issue. You then have an issue in that you are missing a closing...

It may be a bug in the new version. It works if you change it to this: var source = elem || document; return source.querySelector(selector); So either it's a bug, or Crockford wants you to factor the || expression out of that. (There's an argument for it: For instance, it...

JSLint is giving you that error because you're using a unicode escape sequence to represent a character that can be represented normally. In your case you should be able to replace the string with the following: "arc|community blog post." The following is the function used inside JSLint to find allowable...

this is a coding style and not a language fault, and recently JSHint has taken the decision to not implement coding style options in the linter. I'm not sure of the state of development, but it may be/become possible to write extensions to JSHint to enforce one's own coding style....

It's a much easier a problem than squiggly bracket placement. You have a particular type of block -- an empty block -- and JSLint doesn't like empty blocks. It wants statements. Note that a function without a return value returns undefined anyway, so you can kludge this without changing function...

The best practice in my case was to turn on the following flag for the closure compiler: angular_pass: true and use the following annotation: /** * @description App configuration * @param {!angular.$routeProvider} $routeProvider * @constructor * @ngInject */ Therefore we do not need to use the following Config['$inject'] = ['$routeProvider'];...

You can do that with grasp, it is similar to grep, but it searches Javascript abstract syntax trees. For example, if you checkout the keybase node-client, and then run: grasp -r 'if.test[op==]' It will match all the lines in .js files that contain if-statements that have assignment int their test,...

This is not something you can lint for or otherwise identify via static analysis. There are many (most?) cases where a promise chain does not provide a catch and doesn't need to or want to, because the catch will happen somewhere downstream. What you need to do is use your...

First, if you run the code at jslint.com, you only get the redefinition error, which is valid. So I'm not sure why you're seeing errors 1 & 3. How are you linting? Is it within another app? What date of jslint.js are you using? etc etc /*jslint sloppy:true, white:true, browser:true,...

According to this article, for JSHint, ESHint and JSLint (from before July 2013) you can force it into a conditional like this: do { // ... } while ((currentElement = currentElement.offsetParent) !== null); For more recent versions of JSLint you're out of luck and you need to separate out your...

Please vote for WEB-10556 to have TSLint support included in WebStorm/PHPStorm. You can try configuring tslint as a filewatcher for your .ts files as suggested in https://youtrack.jetbrains.com/issue/WEB-10556#comment=27-747735

Not a bug. ;^) As @suish says, by default JSLint does let you know where you used console. Can you provide a simplest-case code example that behaves "incorrectly" when run on jslint.com? I'm not a huge fan of monkeypatching, but what suish suggests is a way to grenade the problem...

The problem is not with ESLint. If you look closely at your message, it says JSHint. Since you're trying to configure ESLint, simplest solution would be to disable or remove JSHint plugin form your IDE. If you still want to use JSHint along with ESLint, you can do the following:...

You have a global function which is also a global variable. Globals are generally a bad thing because they eat up your namespace and cause naming collisions. If you're not worried about that you can let JSLint know which globals you are using by adding the following comment to the...

It would be helpful if you include the following with your question: Python syntax error you refer to in your question Details about your environment (OS at minimum) Without it, I can speculate that you have installed the Sublime Text package that has an unfulfilled dependancy. If you installed the...

You should be able to list Audio as a "Predefined" in the plugin's options or, as you mentioned, as a global within the file that's using it: /*global Audio: false */ Including false here describes it as read-only. The error is because JSLint doesn't currently acknowledge it as a possible...

First code In your original code, the actual error you would have gotten was #1 'APP' used out of scope. var APP = APP || (function() { // Line 1, Pos 11 It is not because JSLint hates global variables, but because it doesn't like the variable being assigned to...

The 2 things I can see which might cause this are: You have unnecessary {}s around your public methods. That is probably causing the expected statement error. Your public methods are assignment statements not just functions, so you should end the line with a semicolon, after the function definition. Without...

Do I get something entirely wrong about how to organize and develop projects in javascript? No, you're on the money. It sounds like common_utils.js is in your control, correct? That is, it's your code? I'm going to assume it is for now. If you find that you're adding exceptions...

According to the Brackets Beautify Documentation, it uses JS-Beautify internally. The documentation for the latter mentions these parameters: -n, --end-with-newline -p, --preserve-newlines If you can force Adobe Brackets to pass parameters to the js-beautify call, I guess one of these should do the trick. UPDATE According to the Github repo,...

JSLint suggests you use other loops such as forEach. http://www.jslint.com/help.html#for You can just select the tolerate "for statement" option at the bottom if this bothers you but the code looks fine....

Since I'm of the opinion that you shouldn't de-optimize your code just to make a pointless warning go away, here are some of your options for dealing with this: Ignore the misguided warning. Switch to jsHint which allows you to instruct jsHint to ignore certain sections of code (with embedded...

No, jshint can't do that. Just do a grep across the sources looking for @author. If you want you could put that in a git pre-commit hook. Or, you could hack JSDoc to error out when creating docs if it encounters @author.

"Read only" error occurs when you assign a value to a built-in native object or a global variable. In your code since you mention in the comments that lastSelectedRow is a global variable, JSHint raises this error to highlight that there is a chance for potential data loss. This error...