Answer the question
In order to leave comments, you need to log in
Stylelint: how to set tab indexing to 4 characters?
In the official documentation , the "indentation" property has 2 options: int | "tab", where int is the number of spaces, that is, either the number of characters (int) with it in spaces or tabs ("tab"), and set the indentation in 4 characters and tabs, I did not find how, is it even possible?
I tried to do it like this - "indentation": "tab", but it throws out except: Expected indentation of 1 tab (indentation)
I made a front picker for Wordpress and I would like to use the official styleguide to typeset, in scss as well, and there indents in tabs and in 4 symbol... some kind of nonsense, why such a popular linter didn't foresee this...
Answer the question
In order to leave comments, you need to log in
The user himself specifies how to display the tab. You like it as 2 spaces, you like it as 4, you like it as 8. And yes, stylelint, judging by the documentation, loves only one single tab.
Space tabs are a pretty cool thing, but large companies generally use 2 spaces for indentation. If anything, this CSS style guide is considered a reference https://github.com/airbnb/css. Also, poking around on the Internet, you can see that Google, Facebook, Uber, Github and all-all-all use 2 spaces for indentation. For both CSS and JS. And any more or less popular open source front-end project also prefers two spaces to one taboo. Reason: it is more convenient to review pull requests. There is no horizontal scroll. Over time, you get used to two spaces, although almost all beginners have genuine feelings for tabs. So it goes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question