JS-JSLint
view release on metacpan or search on metacpan
lib/JS/JSLint.js view on Meta::CPAN
setTime : 'function',
setTimezoneOffset : 'function',
setUTCDate : 'function',
setUTCDay : 'function',
setUTCFullYear : 'function',
setUTCHours : 'function',
setUTCMilliseconds : 'function',
setUTCMinutes : 'function',
setUTCMonth : 'function',
setUTCSeconds : 'function',
setYear : 'function',
shift : 'function',
slice : 'function',
some : 'function boolean',
sort : 'function',
splice : 'function',
stringify : 'function string',
substr : 'function string',
substring : 'function string',
test : 'function boolean',
toDateString : 'function string',
toExponential : 'function string',
toFixed : 'function string',
toJSON : 'function',
toISOString : 'function string',
toLocaleDateString : 'function string',
toLocaleLowerCase : 'function string',
toLocaleUpperCase : 'function string',
toLocaleString : 'function string',
toLocaleTimeString : 'function string',
toLowerCase : 'function string',
toPrecision : 'function string',
toTimeString : 'function string',
toUpperCase : 'function string',
toUTCString : 'function string',
trim : 'function string',
unshift : 'function number',
valueOf : 'function'
},
strict_mode,
syntax = {},
tab,
token,
// type_state_change,
urls,
var_mode,
warnings,
// widget contains the global names which are provided to a Yahoo
// (fna Konfabulator) widget.
widget = array_to_object([
'alert', 'animator', 'appleScript', 'beep', 'bytesToUIString',
'Canvas', 'chooseColor', 'chooseFile', 'chooseFolder',
'closeWidget', 'COM', 'convertPathToHFS', 'convertPathToPlatform',
'CustomAnimation', 'escape', 'FadeAnimation', 'filesystem', 'Flash',
'focusWidget', 'form', 'FormField', 'Frame', 'HotKey', 'Image',
'include', 'isApplicationRunning', 'iTunes', 'konfabulatorVersion',
'log', 'md5', 'MenuItem', 'MoveAnimation', 'openURL', 'play',
'Point', 'popupMenu', 'preferenceGroups', 'preferences', 'print',
'prompt', 'random', 'Rectangle', 'reloadWidget', 'ResizeAnimation',
'resolvePath', 'resumeUpdates', 'RotateAnimation', 'runCommand',
'runCommandInBg', 'saveAs', 'savePreferences', 'screen',
'ScrollBar', 'showWidgetPreferences', 'sleep', 'speak', 'Style',
'suppressUpdates', 'system', 'tellWidget', 'Text', 'TextArea',
'Timer', 'unescape', 'updateNow', 'URL', 'Web', 'widget', 'Window',
'XMLDOM', 'XMLHttpRequest', 'yahooCheckLogin', 'yahooLogin',
'yahooLogout'
], true),
windows = array_to_object([
'ActiveXObject', 'CScript', 'Debug', 'Enumerator', 'System',
'VBArray', 'WScript', 'WSH'
], false),
// xmode is used to adapt to the exceptions in html parsing.
// It can have these states:
// '' .js script file
// 'html'
// 'outer'
// 'script'
// 'style'
// 'scriptstring'
// 'styleproperty'
xmode,
xquote,
// Regular expressions. Some of these are stupidly long.
// unsafe comment or string
ax = /@cc|<\/?|script|\]\s*\]|<\s*!|</i,
// carriage return, or carriage return linefeed
crx = /\r/g,
crlfx = /\r\n/g,
// unsafe characters that are silently deleted by one or more browsers
cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,
// query characters for ids
dx = /[\[\]\/\\"'*<>.&:(){}+=#]/,
// html token
hx = /^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-:]*|[0-9]+|--)/,
// identifier
ix = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,
// javascript url
jx = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,
// star slash
lx = /\*\/|\/\*/,
// characters in strings that need escapement
nx = /[\u0000-\u001f'\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
// outer html token
ox = /[>&]|<[\/!]?|--/,
// attributes characters
qx = /[^a-zA-Z0-9+\-_\/ ]/,
// style
sx = /^\s*([{}:#%.=,>+\[\]@()"';]|[*$\^~]=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,
ssx = /^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/,
// token
tx = /^\s*([(){}\[\]\?.,:;'"~#@`]|={1,3}|\/(\*(jslint|properties|property|members?|globals?)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|[\^%]=?|&[&=]?|\|[|=]?|>{1,3}=?|<(?:[\/=!]|\!(\[|--)?|<=?)?|\!={0,2}|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+(?:[xX][...
// url badness
ux = /&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto|script/i,
( run in 0.720 second using v1.01-cache-2.11-cpan-364913b4093 )