Ignore specific errors using SublimeLinter-scss-lint with Sublime TExt
When using SublimeLinter-scss-lint with my SASS files, it misses errors for common things like, indentation should be 2 spaces, not 4 spaces, after the colan after property needs to be followed by one space, etc. etc., how can one get sublime to ignore them and just watch out for more important bugs?
source to share
You can disable or configure each linter component of the scss linter plugin for Sublime Text 3. You just need to customize the custom settings.
Switch to:
Sublime Text Menu
-> Preferences
-> Package Settings
-> SublimeLinter
-> Settings - User
By default, this file is stored in the path below, but may not exist if you haven't configured any settings yet.
~/Library/Application Support/Sublime Text 3/Packages/User/SublimeLinter.sublime-settings
The basic structure of this file in terms of linter plugins is shown below and will change depending on what you have installed and which plugins you are already using. (I've removed most of the other settings to focus on what's important to configuring the scss plugin.)
{
"user": {
... more settings ...
"linters": {
"csslint": {
...
},
"htmltidy": {
...
},
"jshint": {
...
},
"json": {
...
},
"php": {
...
},
"scss": {
"@disable": false,
"args": [],
"exclude-linter": "Indentation SpaceAfterPropertyColon",
"excludes": [],
"include-linter": ""
},
"xmllint": {
...
}
},
... more settings ...
}
}
The important bit you want is under "linters" β "scss". You can explicitly list linters in the scss plugin to include or exclude.
Complete list of default SCSS elevators
Once the config is set up above it should disable both the indented sheets and SpaceAfterPropertyColon for scss. You can add as many as you like to this list.
source to share