Stylelint: Set indentation to 2 tabs

Created on 4 Jun 2016  路  3Comments  路  Source: stylelint/stylelint

Hello,

I cant' understand how to set "indentation" rule to 2 tabs.

This works:

"indentation": "tab"

But it's only 1 tab.

I need 2 tabs indentation. I've checked the docs and tried many variants, but always got errors like:

Invalid option value "2|"tab"" for rule "indentation"

I'm using Atom stylelint package, the latest version available.

Please, guide me how to set this rule properly. Thanks in advance!

needs discussion

All 3 comments

_2 tabs_ isn't supported.

I've not heard of such a thing before. Is there a CSS styleguide somewhere that uses two tabs that I can look at? I'm curious to see how it works.

If you're after 2 _spaces_, then you should configure your rule as such: indentation: 2.

Thanks for your reply!

It's my bad. I thought that indentation in my editor was set to tabs, while it's set to spaces, where tab equals two spaces.

Though, if I check "indentation" rule page

(https://github.com/stylelint/stylelint/tree/master/src/rules/indentation)

there is line there, which states:

int|"tab" - int = number of spaces

I thought that if I put a number like 2 instead of "int", that would mean something like:

set indentation to two tabs

Could you please clarify that moment?

I've read stylelint user guide and now understand what this line means. Thanks for your help!

Was this page helpful?
0 / 5 - 0 ratings