Hi, I have a question about Switch Case style as verified in jslint.A switch case written as below (case statement starting on the line after the switch...
I understand why the following code generates the warning "Unexpected 'typeof39;. Use '===' to compare directly with undefined" var foo; if (typeof foo ===...
I need to support user-supplied math functions. Are there any good alternatives to using eval, or, more likely, the Function constructor? I could write js code...
Hi, My colleague was linting this and getting an error var a = /<.+>[^]<.+>/; Unescaped '^'. He argued that [^] was a valid succinct way of saying "any...
Unexpected '*'. Rationale for acceptance: The * selector in CSS, also known as the universal selector, is useful for setting styling to the full array of...
I’ve run into an error that is a bit strange to see. The <summary> tag is not allowed as it is unrecognized however the <details> tag is allowed. I’ve...
There appears to be a new rule that looks for unnecessary parenthesis, but this rule gets confused when wrapping regex: var mhtml = true, disqualify = (mhtml)...
Hi guys, I was coding and I noticed that I often make the same error from using reduce. e.g. var options = ['nocaps39;, 'evil', 'node', 'browser39;], ...
The following code causes an error in internet explorer: var window; "SCRPT5039: Redeclaration of const property line 1 character 1" For us it would be useful...
Is there a way to get JSLint to recognize new tags via an option? I have a customer who can't make as good use of JSLint in CSE HTML Validator because it is...
While using jslint on some html with inline script, I run into the following error: A '<script>' must be within '< body div frame head iframe p pre span >'. ...
I get the error 'Node' was used before it was defined. From the line: if (nodes[i].nodeType === Node.TEXT_NODE) { I do have the "Assume a browser" option on. I...
That code gives a strict violation (due to presence of `this`): function f() { 'use strict'; return this.x; } That code doesn't: var f = function () { 'use...
I have a statement in one of my functions: return serverInstanceId = response; JSLint flags it as: Expected ';' and instead saw '='. Unreachable '=' after...
If I need to create an array with a specified length, and the length is a literal, JSLint is happy enough with this: var arr = new Array(50); If, however, the...
I can understand how . and [^...] might be dangerous in a "match" regular expression, but in a replace I cannot see the harm in them. My typical example would...
On Mr Crockford's Remedial JavaScript page: http://javascript.crockford.com/remedial.html near the bottom, there is a little function called 'supplant39; that ...
I expect jslint to accept the following two-line code snippet, but instead it gives the error "Unexpected '['". What am I doing wrong? ===JSLINT INPUT=== var a...
Whilst reviewing some code, I spotted an unnecessary use of call and it stood out to me as a good candidate for a warning. The following code demonstrates the...
Erik Meijer talking about the hazards and other interesting things. http://channel9.msdn.com/posts/Erik-Meijer-Functional-Programming-From-First-Principles...
Hi, I have a module which toggles two group of event handlers : // structure (function () { "use strict"; function a() {} function b() {} function c() {b(c);...
The "node" option specifies that __dirname and __filename are valid options, yet if you don't use the "nomen" option it will still error. Shouldn't the "nomen"...
Some compressors do not touch the initial comments of a file in order to leave copyright, license etc. in place. I find that useful. However, some of my files...
In the case I repeat the same identifier on a catch block I receive an "'identifier' is already defined" error message. try { } catch (exception) { } ... try {...