Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 9e80121

Browse files
committed
Respects tabSize setting when useTabChar is true
1 parent 8670907 commit 9e80121

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • src/extensions/default/JSLint

src/extensions/default/JSLint/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ define(function (require, exports, module) {
6060
// Predefined environments understood by JSLint.
6161
var ENVIRONMENTS = ["browser", "node", "couch", "rhino"];
6262

63+
// gets indentation size depending whether the tabs or spaces are used
64+
function _getIndentSize() {
65+
return PreferencesManager.get("useTabChar") ? PreferencesManager.get("tabSize") : PreferencesManager.get("spaceUnits");
66+
}
67+
6368
/**
6469
* Run JSLint on the current document. Reports results to the main UI. Displays
6570
* a gold star when no errors are found.
@@ -88,7 +93,7 @@ define(function (require, exports, module) {
8893

8994
if (!options.indent) {
9095
// default to using the same indentation value that the editor is using
91-
options.indent = PreferencesManager.get("spaceUnits");
96+
options.indent = _getIndentSize();
9297
}
9398

9499
// If the user has not defined the environment, we use browser by default.

0 commit comments

Comments
 (0)