How to configure 2 spaces instead of tabs..WIth jsHint and Sublime Linter in Sublime Text 3
Asked Answered
D

1

1

I'm trying to configure sublime linter to allow 2 spaces instead of 4 for tabs..This is my settings in SublimeLinter - Open User Settings...

  "linters": {
        "jshint": {
            "@disable": false,
            "args": [],
            "excludes": []

        }
    }

I want to add indent: 2 (i think). So i tried

  "linters": {
        "jshint": {
            "@disable": false,
            "args": [ {indent: 4],
            "excludes": []

        }
    }

But i am not sure how to insert these options because i get the error trying to parse settings: Expected value in Packages/User/SublimeLinter.sublime-settings:20:28

Dawna answered 31/3, 2014 at 18:36 Comment(0)
P
2

I assume that line 20 is the "args" line, as it's malformed. Try

"linters": {
    "jshint": {
        "@disable": false,
        "args": [ {"indent": 4 } ],
        "excludes": []

    }
}

instead. I don't know that it'll make jshint do what you want it to do (I'd read the docs for that), but at least it's valid JSON.

Padilla answered 31/3, 2014 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.