If a multi-line expression contains the ternary operator, the expected indentation level for subsequent lines has increased. http://pastebin.com/T2Prsp8s This...
Well JSLint sees if ( a ) { a(); } else { if ( b ) { b( ); } } And you want if ( a ) { a( ); } else if ( b ) { b( ); } It isn't better, just sees it...
The better solution is to concatenate files in the build phase. Same place you do minification. /Jakob ... [Non-text portions of this message have been...
I had difficulty finding an up-to-date version of jslint.js that worked from the commandline and was easy to set up, so I wrote one myself. It's a short ruby...
It would be nice if there was an option to disable the "Use a named parameter" check. I have a large regular expression that I'm using to find an address in a...
'arguments39; is leaving the language? So, how do we handle functions that accept a variable number of arguments? - Robert Ferney ... [Non-text portions of this...
I've been working on a JS file for a week or so with frequent trips thru JSLint along the way. Today, I getting tons of errors that look like this: Problem at...
I've been wondering what the intent is on that as well. Perhaps the new recommended best practise is to pass in a single array argument in that case? ...
I just ran a chunk of code I have not touched for awhile, that was passing all of the jslint tests. This time complained about a single unexpected ' '. In my...
Plus arguments is the only way to determine if an argument was omitted or if it was given the value undefined. Which should react differently on functions that...
... function f (o) { ....if (o && typeof o.foo !== 'undefined39;) { ........// do something with o.foo ....} ....if (o && typeof o.bar !== 'undefined39; && ...
Simple. Change the format of input to an object literal. Then you can have a variable number of named parameters. Consider the following: var args = {first:...
I don't get the point of removing arguments if it forces you to ask for an array as argument... ... [Non-text portions of this message have been removed]...
I'm using TextMate. Does anyone know of an automated way to remove extra whitespace from lines? It would be incredibly time consuming to do it manually. Also,...
Answering my own question: TextMate: Bundles: Text: Converting/Stripping: Remove Trailing Spaces in Document Looks like a must before running thru JSLint....
2618
Rob Richardson
erobrich@...
Sep 21, 2011 7:27 pm
This works nicely for me: #!/bin/sh cat - | sed s/[ \t]+$//g > &1 Rob ... From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com] On Behalf Of...
... Add this to your .vimrc and then type ;k anytime you want to "klean": "=====[ klean - removes trailing whitespace ]===== map ;k :%s?\s92;+$??<CR> ...
I've been using JSLint for a bit now, and I have noticed that often there are error messages where I wonder why JSLint is complaining about it.. I'm wondering...
I very much like this idea of collecting background info on JSLint's various warnings/errors. ... Perhaps it would make sense to use GitHub's wiki facilities...
It's an excellent idea, as modern JS is the first computer language which is versioned in the same way as human language: on custom rather than central,...
... If and When Mr. Crockford does enable the GitHub's wiki, we can move the posts from http://jslint.wikinet.org/wiki/Main_Page . In the mean time, We will...
How are extra bytes in your file that serve no purpose and can easily be removed by most editors, pre-commit hooks, or a command line tool NOT a problem? As...
does extra space at the end of the line cause any browsers out there to interpret the javascript differently? ... removed by most editors, pre-commit hooks, or...