sassvisual-studio-codelintsass-lint

sass-lint in Visual Studio Code mixed tabs with spaces


I just installed sass-lint in my VS Code editor and I keep on getting this error for each and every property(line) I've set in my *.scss files:

[sass-lint] Mixed tabs and spaces

enter image description here

Indentation type in VS Code is set to tabs(4), it is set to indent using Tabs.

How can I disable mixing of tabs and spaces for sass-lint?


Solution

  • To close this one off, I later on found out that it is a best practice to use a EditorConfig file to pre-set all of your workflow settings.

    This is a plugin-type settings file, which pre-configures desired settings to fit your workflow.

    In my case, I use EditorConfig for VScode. After you add it to your editor of choice, simply create a .editorconfig file in your base(root) directory and fill it with the desired settings.

    e.g. , my base setup looks like this:

    # Editor configuration, see http://editorconfig.org
    root = true
    
    [*]
    charset = utf-8
    indent_style = tab
    indent_size = 4
    insert_final_newline = true
    trim_trailing_whitespace = true
    
    [*.md]
    max_line_length = off
    trim_trailing_whitespace = false