How to set up 2 spaces instead of tabs. WIth jsHint and Sublime Linter in Sublime Text 3
I am trying to set up a sublime linter to allow 2 spaces instead of 4 for tabs. These are my settings in SublimeLinter - Open User Settings ...
"linters": {
"jshint": {
"@disable": false,
"args": [],
"excludes": []
}
}
I want to add indentation: 2 (I think). So I tried
"linters": {
"jshint": {
"@disable": false,
"args": [ {indent: 4],
"excludes": []
}
}
But I am not sure how to insert these settings because I am getting an error while trying to parse the settings: Expected value in Packages / Custom / SublimeLinter.sublime-settings: 20: 28
+1
source to share
1 answer
I am assuming line 20 is line "args"
since it is not correct. Try
"linters": {
"jshint": {
"@disable": false,
"args": [ {"indent": 4 } ],
"excludes": []
}
}
instead of this. I don't know what this will jshint
do to do what you want (I read the docs for this), but at least it is valid JSON .
+2
source to share