SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 61 forks source link

docs(names): indentPref vs. indentSpaces #435

Closed Kristinita closed 6 years ago

Kristinita commented 6 years ago

1. Summary

In Stylint documentation I read about 2 options: indentPref and indentSpaces. Possibly:

  1. They denote the same option
  2. indentPref incorrect and needs replacing

2. Citations

indentSpaces (default: 4, number or false)

This works in conjunction with depthLimit. If you indent with spaces this is the number of spaces you indent with. If you use hard tabs, set this value to false.

By default this value is 4, so if you indent with hard tabs or 2 spaces you'll need to manually set this value in a custom .stylintrc file. With default settings, this means the depth limit is 4 indents of 4 spaces each.

mixed (default: false, boolean, relies on indentPref)

Returns true if mixed spaces and tabs are found. If a number is passed to indentPref (4 is the default), it assumes soft tabs (ie, spaces), and if false is passed to indentPref it assumes hard tabs.

If soft tabs, throws warning if hard tabs used. If hard tabs, throws warning if unnecessary extra spaces found.

Example if indentPref: 4 and mixed: true: prefer \s\s\s\smargin\s0 over \tmargin\s0

Example if indentPref: 2 and mixed: true: prefer \s\smargin\s0 over \tmargin\s0

Example if indentPref: false and mixed: true: prefer \tmargin\s0 over \s\s\s\smargin\s0

Thanks.

Kristinita commented 6 years ago

Status: :exclamation: Another problem

#437.

Thanks.