Hello Tony!
I verified current sources from http://github.com/tonytomov/jqGrid/tree/dev with respect of JSLint. Here are the results:
grid.grouping.js:
Line 226: „return v=v+1;“ should be replaced to return v+1;
Lines 17,38,125,153: Missing semicolon
Line 138: Unused variable hs.
Line 88: Missing radix parameter in the parseInt() function.
In the line 8 are used isObject() function which is not defined here. It is defined in the line 543 of jquery.fmatter.js.
grid.common.js:
In lines 235, 244 one should add '{' … '}' after if-statement
jquery.fmatter.js:
In the lines 500-503 are defined debug() function which are not used.
At the line 102 would be better to replace dateFormat[“i18n”] to the dateFormat.i18n
Unescaped '-' are used in the lines 90,91,112,113.
grid.custom.js:
switch-statemant from the line 263 will be recommended to replace with the if-statement.
grid.base.js:
at line 1309 are use cmtypes=grtypes=[] inside a var declaration. If should be probably replaced to the cmtypes=[], grtypes=[].
Unescaped '-' are used in the lines 70, 71.
Missing semicolon are found at the lines 1154,2365,2546.
The Object grpdata defined in the line 1017 are used in 1092, 1093. It is defined in the scope of if block defined in the line 1014 and closed in the line 1089.
Exactly in the same way the variable rn defined in the line 1015 are used in 1107. It is defined in the scoup of if block defined in the line 1014 and closed in the line 1089.
Because the scope of the variable in JavaScript is function and not block it is not real error, but it is not nice to do this.
Unused variable: ft defined in the line 67 and sortype defined in the line 1309
grid.formedit.js:
Lines 88-91 should be better reformated to have ',' as the last character at the line and not the first one.
The line 246 should be probably started with “var ” or ';' on the previous line should be replaced to ','.
Missing semicolon at the lines 1025,1035,1036,1490,1491
Indexed usage of properties in the lines 1027,1029,1035,1482,1484,1490 (like ajaxOptions['url']) should be better written in dot notation.
Variable searchable are defined in the line 133 will not be used (see line 135 defines another one which hide the variable defined in the line 133)
Variable copydata defined and assigned in the line 339 (see line 332) are never used. Function postIt() define and use another local copydata variable.
Variables gurl and ret defined in the line 320 will be never used.
Variable valref will be defined twice in the lines 421 and 1103 and will be never used.
Variable dummy defined in the line 882 will be never used.
Variable flr defined in the line 1099 will be never used.
Variables tdl and tde defined in the line 1226 will be never used.
Variable opt defined in the line 1272 will be never used.
grid.setcolumns.js:
Missing semicolon at the line 60.
In the line 91 one should add '{' … '}' after if-statement
grid.subgrid.js:
Unused variable res declered in the line 79 and variable cur declered in the line 129.
grid.treegrid.js:
Missing semicolon at the lines 178, 375, 406.
Unused variable nm declered in the line 461.
Every file from the i18n directory has the same old small syntax problem – missing semicolon after the return statement inside of the definition of the function $.jgridformatter.date.S.
For example, grid.locale-en.js
has in the line 103 return statment without ';'
Best regards
Oleg
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top