space indentation expected - Codacy
Asked Answered
S

2

5

I heard that good practice is to use something to check my code. I found something called Codacy. I understand everything except 'space indentation expected' from TSLint and TSLint4. Is it because my ident in project is tab? If yes, how can I change this one rule in codacy?

import {NgModule} from '@angular/core';
import {CommonModule}  from '@angular/common';
import {RouterModule, Routes} from '@angular/router';

import {TranslationModule} from '../translate.module';

const adminRoutes: Routes = [
    {
        path: 'admin',
        children: [
        ]
    }
];

@NgModule({
    imports: [
    CommonModule, RouterModule.forRoot(adminRoutes), TranslationModule
    ],
    declarations: [
    ],
    exports: [
    ]
})
export class AdminModule { }

Codacy show problem with

{
    path: 'admin',
    children: [
    ]
}
Sharitasharity answered 3/6, 2017 at 19:42 Comment(0)
T
5

Have a look at the documentation. for instance:

"indent": [true, "tabs", 2]
Te answered 5/6, 2017 at 11:26 Comment(0)
M
2

see also : maintain consistent styling with angular style guide using tslint

https://github.com/angular/angular-cli/wiki/lint

"indent": [true, "tabs", 4]
Marva answered 10/8, 2018 at 21:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.