Fox Indents in Indented Languages like SASS, CoffeeScript, LiveScript, Haskell, Ocaml, F#, Python, etc
npm install fix-indents!Logo
Fix Indents in Indented Languages like SASS, Pug, CoffeeScript, LiveScript, Haskell, Ocaml, F#, Python, Bash, etc.
!Demo
###Other Examples
!SASS Example
###Motivation
* Developer puts different amount of indents during development. This tools allows to refactor indents into one consistent and accurate indented style.
* Sometimes Developer need to add top level block. It forces to move all nested tree.
* SASS will throw the error for inconsistent indents
``sh`
#Install Nodejs
npm install fix-indents -g
shfix-indents ./style.sass
`$3
`JavascriptfixIndents = require("fix-indents");
fixedCode = fixIndents("PUT CODE HERE", { /options/ });
console.log(fixedCode);
`$3
Option | Description
--- | ---
countSpaces | Prefered amount of spaces for formatting
ignoreInside | Ignore multiline comment and multiline strings
Example for LiveScript:
`JSON
{
"countSpaces": 2,
"ignoreInside": [
["'''", "'''"],
["/" , "/" ],
["\"\"\"", "\"\"\""]
]
``