Space Indentation Expected in ng lint

2019-06-27 19:05发布

I keep getting error "space indentation expected" while running ng lint. It is a quite amount of lines that having the same issue in my application. How can I solve this warning? Is anyone having face the similar issue ?

标签: tslint
1条回答
叛逆
2楼-- · 2019-06-27 19:51

By default ng lint expects indentation to be 2 spaces. You can change these settings in your tslint.json.

If you want to use 4 spaces:

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

If you want to use tabs (4 spaces wide):

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

See this section of the docs for reference.

查看更多
登录 后发表回答