Skip to content

Commit

Permalink
indent:false shouldn't trigger indent warnings; closes jshintGH-1035
Browse files Browse the repository at this point in the history
  • Loading branch information
valueof authored and jugglinmike committed Oct 21, 2014
1 parent aa66669 commit 41dddea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stable/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4147,7 +4147,7 @@ var JSHINT = (function () {
newOptionObj["(explicitNewcap)"] = true;

if (optionKeys[x] === "indent")
newOptionObj["(explicitIndent)"] = true;
newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions tests/stable/unit/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,12 @@ exports.indentation = function (test) {
.addError(6, "Mixed spaces and tabs.")
.test(src, {es3: true});

// indent:false shouldn't trigger indent (GH-1035)
TestRun(test)
.addError(5, "Mixed spaces and tabs.")
.addError(6, "Mixed spaces and tabs.")
.test(src, {es3: true, indent: false});

TestRun(test)
.addError(5, "Mixed spaces and tabs.")
.addError(6, "Mixed spaces and tabs.")
Expand Down

0 comments on commit 41dddea

Please sign in to comment.