forked from jslint-org/jslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfulljslint.html
executable file
·284 lines (267 loc) · 10.7 KB
/
fulljslint.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<html>
<head><title>JSLint, The JavaScript Code Quality Tool</title>
<link rel="icon" type="image/gif" href="http://www.JSLint.com/favicon.gif">
<style>
fieldset {
background-color: blanchedalmond;
border: 2px solid black;
color: black;
margin: 1em;
padding: 8px;
text-align: left;
}
legend {
background-color: thistle;
border: 2px solid black;
color: black;
padding: 8px;
}
i {
font-family: serif;
font-style: italic;
}
p {
padding-left: 10pt;
}
input[type="button"] {
background-color: navajowhite;
border: 2px solid black;
color: black;
}
input[type="button"]:hover {
background-color: lightsteelblue;
text-decoration: underline;
}
input[type="button"]:active {
background-color: indianred;
text-decoration: none;
}
input[type="text"] {
border: 1px dotted black;
text-align: center;
}
a:link {
color: darkblue;
}
a:visited {
color: purple;
}
a:hover {
color: blue;
}
a:active {
color: red;
}
body {
background-color: gainsboro;
padding-left: 5%;
padding-right: 5%;
text-align: center;
}
.leftcolumn {
float: left;
margin: 1em;
}
#errors {
margin: 1em;
border: 2px solid black;
padding: 1em;
background-color: mistyrose;
}
#errors p {
margin-left: 2em;
}
#errors p.evidence {
margin-left: 0;
font-family: monospace;
}
#functions {
background-color: white;
}
#members {
background-color: peachpuff;
}
#functions, #members {
border: 2px solid black;
font-family: monospace;
margin: 1em;
padding: 1em;
}
#functions div {
margin-left: 10em;
text-indent: -5em;
}
#functions div.function {
margin-left: 0;
text-indent: 0;
}
#JSLINT_OUTPUT {
text-align: left;
}
#JSLINT_INPUT{
border: 2px solid black;
color: black;
font-family: monospace;
height: 3in;
overflow: auto;
padding: 0.5em;
width: 100%;
}
#JSLINT_JSLINTSTRING {
background-color: peachpuff;
border: 2px solid black;
font-family: monospace;
margin: 1em;
padding: 1em;
}
#JSLINT_OPTIONS {
background-color: linen;
}
#JSLINT_TREE {
text-align: left;
}
</style></head>
<body>
<table border="0">
<tr>
<td><img src="jslint.gif" width="383" height="120" alt="JSLint"> </td>
<td valign="middle" align="left">
<p><big>The <a href="http://javascript.crockford.com/">JavaScript</a> Code Quality Tool</big></p>
<p id=JSLINT_EDITION></p>
<p>
<a href="http://www.JSLint.com/lint.html">Read the instructions.</a>
<a href="#JSLINT_OPTIONS">Set the options.</a>
<a href="http://www.amazon.com/exec/obidos/ASIN/0596517742/wrrrldwideweb"
target="_blank">Enjoy <i>The Good Parts</i>.</a></p>
</td></tr></table>
<script src="fullwebjslint.js">
// fullwebjslint.js is the concatenation of
// json2.js + fulljslint.js + adsafe.js + intercept.js
</script>
<div id="JSLINT_">
<p style="background-color: transparent;"><textarea id="JSLINT_INPUT"></textarea></p>
<p>
<input type="button" name="jslint" value="JSLint">
<input type="button" name="tree" value="Syntax Tree">
<input type="button" name="clear" value="clear">
</p>
<br clear="all">
<div id="JSLINT_OUTPUT">
<div style="text-align: center;">Paste your program into the text box
above and click a <input type="button" name="jslint" value="JSLint">
button.</div>
<div style="text-align: center; margin: 1em; border: 2px solid black; padding: 1em; background-color: lightpink;">
WARNING: JSLint will hurt your feelings.
</div>
</div>
<pre id="JSLINT_TREE"></pre>
<br clear="all">
<p>
<input type="button" name="jslint" value="JSLint">
<input type="button" name="tree" value="Syntax Tree">
<input type="button" name="clear" value="clear">
</p>
<fieldset id="JSLINT_OPTIONS" style="background-color: linen;"><legend>Options</legend>
<div class="leftcolumn">
<input type="checkbox" id="JSLINT_WHITE" title="white" name=goodpart><label for="JSLINT_WHITE" title="white">Strict white space</label>
<br>
<input type="checkbox" id="JSLINT_ONEVAR" title="onevar" name=goodpart><label for="JSLINT_ONEVAR" title="onevar">Allow one <tt>var</tt> statement per function</label>
<br>
<input type="checkbox" id="JSLINT_FORVAR" title="forvar" name=goodpart><label for="JSLINT_FORVAR" title="forvar">Disallow <tt>var</tt> in <tt>for</tt> header</label>
<br>
<input type="checkbox" id="JSLINT_UNDEF" title="undef" name=goodpart><label for="JSLINT_UNDEF" title="undef">Disallow undefined variables</label>
<br>
<input type="checkbox" id="JSLINT_NEWCAP" title="newcap" name=goodpart><label for="JSLINT_NEWCAP" title="newcap">Require Initial Caps for constructors</label>
<br>
<input type="checkbox" id="JSLINT_NOMEN" title="nomen" name=goodpart><label for="JSLINT_NOMEN" title="nomen">Disallow dangling <tt>_</tt> in identifiers</label>
<br>
<input type="checkbox" id="JSLINT_REGEXP" title="regexp" name=goodpart><label for="JSLINT_REGEXP" title="regexp">Disallow <tt>.</tt> and <tt>[^</tt>...<tt>]</tt> in /RegExp/</label>
<br>
<input type="checkbox" id="JSLINT_PLUSPLUS" title="plusplus" name=goodpart><label for="JSLINT_PLUSPLUS" title="plusplus">Disallow <tt>++</tt> and <tt>--</tt></label>
<br>
<input type="checkbox" id="JSLINT_BITWISE" title="bitwise" name=goodpart><label for="JSLINT_BITWISE" title="bitwise">Disallow bitwise operators</label>
<br>
<input type="checkbox" id="JSLINT_STRICT" title="strict"><label for="JSLINT_STRICT" title="strict">Require <tt>"use strict";</tt></label>
</div>
<div class="leftcolumn">
<input type="checkbox" id="JSLINT_PASSFAIL" title="passfail"><label for="JSLINT_PASSFAIL" title="passfail">Stop on first error</label>
<br>
<input type="checkbox" id="JSLINT_BROWSER" title="browser"><label for="JSLINT_BROWSER" title="browser">Assume a browser</label>
<br>
<input type="checkbox" id="JSLINT_DEVEL" title="devel"><label for="JSLINT_DEVEL" title="devel">Assume <code>console</code>, <code>alert</code>, ...</label>
<br>
<input type="checkbox" id="JSLINT_RHINO" title="rhino"><label for="JSLINT_RHINO" title="rhino">Assume <a href="http://www.mozilla.org/rhino/">Rhino</a></label>
<br>
<input type="checkbox" id="JSLINT_WIDGET" title="widget"><label for="JSLINT_WIDGET" title="widget">Assume a <a href="http://widgets.yahoo.com/tools/">Yahoo Widget</a></label>
<br>
<input type="checkbox" id="JSLINT_WINDOWS" title="windows"><label for="JSLINT_WINDOWS" title="windows">Assume
Windows</label>
<br><br>
<input type="checkbox" id="JSLINT_SAFE" title="safe"><label for="JSLINT_SAFE" title="safe">Safe Subset</label>
<br>
<input type="checkbox" id="JSLINT_ADSAFE" title="adsafe"><label for="JSLINT_ADSAFE" title="adsafe"><a href="http://www.ADsafe.org">ADsafe</a></label>
</div>
<div class="leftcolumn">
<input type="checkbox" id="JSLINT_DEBUG" title="debug"><label for="JSLINT_DEBUG" title="debug">Tolerate <tt>debugger</tt> statements</label>
<br>
<input type="checkbox" id="JSLINT_EVIL" title="evil"><label for="JSLINT_EVIL" title="evil">Tolerate <tt>eval</tt></label>
<br>
<input type="checkbox" id="JSLINT_FORIN" title="forin"><label for="JSLINT_FORIN" title="forin">Tolerate <a href="http://yuiblog.com/blog/2006/09/26/for-in-intrigue/">unfiltered</a> <tt>for</tt> <tt>in</tt></label>
<br>
<input type="checkbox" id="JSLINT_SUB" title="sub"><label for="JSLINT_SUB" title="sub">Tolerate inefficient subscripting</label>
<br>
<input type="checkbox" id="JSLINT_CONTINUE" title="continue"><label for="JSLINT_CONTINUE" title="continue">Tolerate <tt>continue</tt></label>
<br>
<input type="checkbox" id="JSLINT_CSS" title="css"><label for="JSLINT_CSS" title="css">Tolerate CSS workarounds</label>
<br>
<input type="checkbox" id="JSLINT_CAP" title="cap"><label for="JSLINT_CAP" title="cap">Tolerate <tt>HTML</tt> case</label>
<br>
<input type="checkbox" id="JSLINT_ON" title="on"><label for="JSLINT_ON" title="on">Tolerate <tt>HTML</tt> event handlers</label>
<br>
<input type="checkbox" id="JSLINT_FRAGMENT" title="fragment"><label for="JSLINT_FRAGMENT" title="fragment">Tolerate <tt>HTML</tt> fragments</label>
<br>
<input type="checkbox" id="JSLINT_ESV" title="es5"><label for="JSLINT_ESV" title="es5">Tolerate ES5 syntax</label>
</div>
<div class="leftcolumn">
<input type="button" id="JSLINT_GOODPARTS" value="The Good Parts">
<br><br>
<input type="button" id="JSLINT_CLEARALL" value="Clear All Options">
</div>
<div class="leftcolumn">
<input id="JSLINT_INDENT" type="text" size="2" title="indent" value="" autocomplete=off> <label for="JSLINT_INDENT" title="indent">Indentation</label><br>
<input id="JSLINT_MAXLEN" type="text" size="2" title="maxlen" value="" autocomplete=off> <label for="JSLINT_MAXLEN" title="maxlen">Maximum line length</label><br>
<input id="JSLINT_MAXERR" type="text" size="2" title="maxerr" value="" autocomplete=off> <label for="JSLINT_MAXERR" title="maxerr">Maximum number of errors</label><br>
<label for="JSLINT_PREDEF">Predefined <small>( <code>,</code> separated)</small></label> <input id="JSLINT_PREDEF" type="text" size="72" autocomplete=off title=predef>
</div>
<br clear=all>
<p id=JSLINT_JSLINTSTRING></p>
</fieldset>
<p> Copyright 2002 <a href="http://www.JSLint.com/lint.html">Douglas
Crockford.</a> <a target="_blank" href="http://www.crockford.com/">All
Rights Reserved Wrrrldwide and Beyond!</a> <br>
<a href="http://javascript.crockford.com/code.html" target="_blank">Code
Conventions for the JavaScript Programming Language.</a>
<a href="http://tech.groups.yahoo.com/group/jslint_com/" target="_blank">Join
the JSLint Group.</a> </p>
<script>
ADSAFE.id("JSLINT_");
</script>
<script src="fullinit_ui.js"></script>
<script>
ADSAFE.go("JSLINT_", function (dom, lib) {
"use strict";
lib.init_ui(dom);
});
</script>
</div>
<a href="http://www.JSLint.com/"><img src="jslintpill.gif" width="36" height="17" border="0"></a>
<a href="http://tech.groups.yahoo.com/group/jslint_com/"><img src="y.gif" width="31" height="17" border="0"></a>
<a href="https://github.com/douglascrockford/JSLint"><img src="github.gif" width="39" height="16" border="0"></a>
<a href="http://www.ADsafe.org/"><img src="adsafepill.gif" width="36" height="17" border="0"></a>
<a href="http://www.JSON.org/"><img src="jsonpill.gif" width="36" height="17" border="0"></a>
<a href="http://www.1and1.com/?k_id=10219574"><img src="1and1pill.gif" width="36" height="17" border="0"></a>
</body></html>