PDA

View Full Version : [OPEN-1116] JSLint unused variables report.



WixSL
11 Jul 2010, 6:04 AM
I don't know if this helps, but i run Ext on JSLint and it shows the following unused local variables.


Unused Ext 3.2.1 local variables reported by JSLint (Variable Name -> Line Number):


· ext-base-debug.js:

idSeed 539,
runTasks 924,
EL 1180,
WFN 1180,
checkRelatedTarget 1180,
elContains 1180,
pub 1180,
EU 1489,
j 1499,
l 1499,
index 1499,
getConnectionObject 1537,
createXhrObject 1537,
element 1806,
options 1806,
val 1806,
getIndex 2201,
correctFrame 2201,
proto 2347,
translateValues 2347


· ext-all-debug.js:

keyVal 31,
i 139,
len 139,
style 139,
fm 523,
nthRe 632,
nthRe2 632,
child 632,
next 632,
prev 632,
children 632,
byClassName 632,
attrValue 632,
concat 632,
byTag 632,
byAttribute 632,
byPseudo 632,
quickId 632,
mode 989,
r 1221,
ri 1221

Condor
11 Jul 2010, 7:47 AM
Most of these variables are NOT unused. JSLint just can't detect every type of usage.

You'll have to check each variable separately to see if it really isn't used.

WixSL
11 Jul 2010, 10:20 AM
Ok, thanks for the replay, this is the updated list of unused vars for ext-base-debug.js:

Unused Ext 3.2.1 variables reported by JSLint:


· ext-base-debug.js:
idSeed (Ext-more.js 21),
EL, WFN (ext-base-event.js 20),
EU (ext-base-event.js 23),
j, l, index (ext-base-event.js 328),
element, options, val (ext-base-ajax.js 286/287/289),
proto (ext-base-anim.js 379)



Added unused local variables in ext-all.js:


· data/Store.js
actions 1093

· data/Api.js
reader 192

· data/DataField.js
t 24

· data/GroupingStore.js
sortToggle 181

· data/JsonReader.js
fi, f1 230

· util/XTemplate.js
fm 374

· dd/DDCore.js
el 2886

· adapter/yui-bridge.js
E 12
A 16

· core/Element.alignment.js
d 143

· core/Element.style-more.js
pxMatch 16

· core/EventManager-more.js
propRe 10

· core/Ext-more.js
isSeed 21

· core/Template-more.js
fm 97

· widgets/MessageBox.js
waitTimer 39
pp, spacerEl 40

· widgets/Resizable.js
ox 494
oy 495

· widgets/Shadow.js
iea 131

· widgets/Slider.js
el 659

· widgets/TabPanel.js
ow 758
ow 855

· widgets/Window.js
t 449
force 668

· widgets/tree/TreeFilter.js
t 102

· widgets/tree/TreeSelectionModel.js
sm 173

· widgets/layout/BorderLayout.js
cm 873

· widgets/layout/ColumnLayout.js
h 129

· widgets/layout/MenuLayout.js
t 93

· widgets/layout/TableLayout.js
len, c, i 110

· widgets/grid/GridDD.js
data 59

· widgets/grid/GridView.js
s 1107