indent.js

Fast, minimalistic, pure code indentation. Indents JavaScript, JSON, JSX, Typescript, TSX, CSS, LESS, SCSS, and HTML. Unlike JSBeautify, which adds new lines when reformatting code and changes single line expressions, indent.js preserves new lines in when indenting it. Indent.js is coded with simple, but universal, and unopinionated rules.

Example JSX Class JSX Ant Design TSX Class HTML SCSS LESS Indent Tab Size 2 4 Tab

Browser not compatible.