At RWE, I got the idea after hearing Douglas' talk on the Good Parts to
use AdSafe and JSLint for a new (poorly considered in my opinion but I
don't pay the bills) feature to include content from some outside
source. The idea is that we'll create a separate caching server that
will take the URLs some content author want to have included, request
them via HTTP, and run the response through JSLint (with the adsafe
option). If it passes, we'll include it if not, we'll fire off some
exception log/email or something. The server would then use the caching
data to regularly do conditional GETs (IF-NOT-MODIFIED) to keep its
internal copy up to date.
So today I thought I'd see just how well JSLint works. I took the markup
and passed it through the online
jslint tool with Adsafe and tolerate fragements enabled. I got the
Problem at line 1 character 8: Missing quotes around id attribute value.
Problem at line 1 character 10: Unexpected '_' in 'WIDGETNAME_'.
Problem at line 1 character 10: ADSAFE violation: bad id.
Problem at line 1 character 21: Attribute 'WIDGETNAME_' not all lower
Problem at line 1 character 21: Bad identifier.
Problem at line 4 character 1: Missing "use strict" statement.
Problem at line 4 character 1: ADsafe violation: Missing ADSAFE.id or
Problem at line 4 character 1: Stopping, unable to continue. (13%
From my point of view either JSLint is broken (wrt ADsafe) or the
examples on the page are out of date.
Am I missing something?
[Non-text portions of this message have been removed]