Skip to content
Browse files

Lint updates

  • Loading branch information...
1 parent 99748e1 commit c1200014ae7dfbada45449ba5dda54ff30202882 @istvan-antal committed
Showing with 14 additions and 6 deletions.
  1. +9 −0 tests/good/indent.js
  2. +4 −5 tools/jshint/rhino.js
  3. +1 −1 tools/jslint/jslint-check.js
View
9 tests/good/indent.js
@@ -0,0 +1,9 @@
+var foo = 2,
+ bar = 2;
+
+function barfoo() {
+ "use strict";
+ return 5;
+}
+
+foo = foo + bar;
View
9 tools/jshint/rhino.js
@@ -7,8 +7,7 @@
optstr, // arg1=val1,arg2=val2,...
predef, // global1=override,global2,global3,...
opts = { rhino: true },
- retval = 0,
- optsToInt = ['indent'];
+ retval = 0;
args.forEach(function (arg) {
if (arg.indexOf("=") > -1) {
@@ -31,7 +30,9 @@
if (optstr) {
optstr.split(',').forEach(function (arg) {
var o = arg.split('=');
- if (optsToInt.indexOf(o[0]) === -1) {
+ if (o[0] === 'indent') {
+ opts[o[0]] = parseInt(o[1], 10);
+ } else {
opts[o[0]] = (function (ov) {
switch (ov) {
case 'true':
@@ -42,8 +43,6 @@
return ov;
}
}(o[1]));
- } else {
- opts[o[0]] = parseInt(o[1], 10);
}
});
}
View
2 tools/jslint/jslint-check.js
@@ -7,7 +7,7 @@ var opts = {
browser: true,
onevar: false,
undef: false,
- nomen: false,
+ nomen: true,
eqeqeq: true,
plusplus: true,
bitwise: false,

0 comments on commit c120001

Please sign in to comment.
Something went wrong with that request. Please try again.