Code: (lambda () (setq indent-tabs-mode nil) (setq typescript-ts-mode-indent-offset 2) (typescript-ts-mode) (indent-region (point-min) (point-max))) Point-Char: | Name: Basic indentation =-= const foo = () => { console.log("bar"); if (x) { return y; } else if (y) { return u; } return baz.x() ? true : false; } =-=-= Name: Statement indentation without braces =-= const foo = () => { if (true) console.log("if_statement"); else if (false) console.log("if_statement"); else console.log("else_clause"); for (let i = 0; i < 1; i++) console.log("for_statement"); for (let i of [true]) console.log("for_in_statement"); while (false) console.log("while_statement"); do console.log("do_statement"); while (false) }; =-=-= Name: Switch statement =-= const foo = (x: string) => { switch (x) { case "a": console.log(x); return 1; case "b": return 2; case "c": default: return 0; } }; =-=-= Code: (lambda () (setq indent-tabs-mode nil) (setq tsx-ts-mode-indent-offset 2) (tsx-ts-mode) (indent-region (point-min) (point-max))) Name: JSX indentation =-= const foo = (props) => { return (
{ props.foo ? Hello, foo! : Hello, World!; }
); } =-=-= Name: JSX indentation with attributes =-= const foo = (props) => { return (
{ alert('???'); return () => { return 5+5; }; }} >

Some text

); } =-=-=