Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable "space indentation expected" errors

Tags:

angular-cli

Running ng lint gives me a lot of "space indentation expected" errors, reason being me using tabs instead of spaces. I'd be ok using 4 spaces instead of the tabs, but I can't work with 2-space-indentations.

I understand that the angular cli team currently doesn't have any plans to change the 2 space indentations, but is there any way of configuring the linter that it doesn't raise warnings about it?

Excluding all .ts files from linting is not a feasable option for me, putting "tslint:disable-next-line:indent" in all of the files like suggested here is also quite annoying.

like image 714
user3255061 Avatar asked Mar 06 '23 14:03

user3255061


1 Answers

"indent": [
  true,
  "tabs",
  4
],

in the tslint.json did the trick. See this reference in the docs.

like image 147
user3255061 Avatar answered Apr 30 '23 05:04

user3255061