allow moz and es6 settings to work together

This commit is contained in:
nightwing 2013-07-18 13:09:08 +04:00
commit 6788031994

View file

@ -1444,9 +1444,6 @@ var JSHINT = (function () {
} }
function assume() { function assume() {
if (state.option.es5) {
warning("I003");
}
if (state.option.couch) { if (state.option.couch) {
combine(predefined, vars.couch); combine(predefined, vars.couch);
} }
@ -1514,16 +1511,10 @@ var JSHINT = (function () {
// Let's assume that chronologically ES3 < ES5 < ES6/ESNext < Moz // Let's assume that chronologically ES3 < ES5 < ES6/ESNext < Moz
state.option.inMoz = function (strict) { state.option.inMoz = function (strict) {
if (strict) {
return state.option.moz && !state.option.esnext;
}
return state.option.moz; return state.option.moz;
}; };
state.option.inESNext = function (strict) { state.option.inESNext = function (strict) {
if (strict) {
return !state.option.moz && state.option.esnext;
}
return state.option.moz || state.option.esnext; return state.option.moz || state.option.esnext;
}; };