Loading ...
Sorry, an error occurred while loading the content.
Advanced Search
Author
Subject
Message
Special notice only

36 results from messages in jslint_com

Advanced Search
  • Heinz Rasched wrote on Mon, 25 Feb 2013 at 12:37:13 -0000 in : > function f(an_array) { > 'use strict' > var i = 0, > n = an_array.length; > for (; i < n; i += 1) { > // operate on an_array[i] > } > } From an idempotency perspective, you're better off with the the initialization in the for loop anyhow. Because it's common for functinos to be long enough that review of all the code...
    John Hawkinson Feb 25, 2013
  • douglascrockford wrote on Sat, 19 Jan 2013 at 13:20:21 -0000 in : > One of the design principles behind JSLint is that if a feature is > problematic, and if it can be completely replaced with another > feature that is less problematic, then the more problematic feature > should not be allowed. It would really help if the documentation explained why [^] was excluded. --jhawk@^$1 John Hawkinson
    John Hawkinson Jan 19, 2013
  • douglascrockford wrote on Thu, 4 Oct 2012 at 02:00:02 -0000 in : > Fix your code. It would be so easy to explain why this construct is disfavored. It would be so easy to give a link to a web page. It would be so easy to be polite. Why is it necessary to be rude? --jhawk@^$1 John Hawkinson
    John Hawkinson Oct 3, 2012
  • Fetching Sponsored Content...
  • > To my knowledge, `function f` is just a shortcut for `var f = function`. > I am unaware of any difference between both. The former is hoisted. --jhawk@^$1 John Hawkinson
    John Hawkinson Sep 21, 2012
  • ...be an awesome tool, instead is just about fights over style. I wish we could rise above this, but I do not see a path forward. --jhawk@^$1 John Hawkinson
    John Hawkinson Aug 31, 2012
  • When you deal with strings that contain double quotes and strings that contain single quotes: "Warning: can't find token." 'Invalid input: "cheese"' it is convenient to switch between single and double quotes. A rule that prevented that would be annoying. --jhawk@^$1 John Hawkinson
    John Hawkinson Jul 1, 2012
  • ...style. I do not want to think about what all the local variables used by the functions I call are. And I should not have to. --jhawk@^$2 John Hawkinson > This too should be illegal: > > function a() { > ````var i; > ````function b() { > ````````var i...
    John Hawkinson May 9, 2012
  • ...must *tolerate* the stupidity, whereas those who write to the Node.js spec need not do so. This seems...semantically reversed) --jhawk@^$1 John Hawkinson > JSLint now warns when properties contain the substring 'Sync'. The > use of that substring in Nodejs is to...
    John Hawkinson Mar 30, 2012
  • JSLint wants you wrap your function expression in parentheses. I think it's probably right, multiword expressions are confusing to read, and parens remove the confusion. --jhawk@^$1 John Hawkinson > var obj = {}, > ````test = function () { > ````````'use strict'; > ````````return true; > ````}.bind(obj); ... > Problem at line 5 character 6: Unexpected '.'.
    John Hawkinson Feb 14, 2012
  • mathew wrote on Mon, 14 Nov 2011 at 13:23:24 -0600: > Someone else already suggested running a beautifier on the code. Here are > three more solutions: ... These solutions may be reasonable if you are just starting out. They are not reasonable if you have a large installed codebase. Guess which position most jslint users are in? --jhawk@^$1 John Hawkinson
    John Hawkinson Nov 14, 2011