Codacy requires space indentation to be used

I've been learning about the importance of code checking tools and came across something called Codacy. One thing I'm confused about is the 'space indentation expected' issue with TSLint and TSLint4. Could this be related to my project using tabs for indentation? If so, how can I adjust this specific 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 has pointed out an issue with the following:

{
    path: 'admin',
    children: [
    ]
}

Answer №1

Check out the guide. An example is:

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

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best option: rewriting conditions and rules in Virtual Host or .htaccess file?

Currently, I am utilizing apache 2.4 to host an angular2 application. Initially, I defined the rewrite rules and conditions within my virtual host configuration. However, now I'm contemplating whether it would be more advantageous to employ an .htacce ...

Error: The reference to "global" is undefined and was not caught in the promise

After successfully running my project, I encountered an issue upon installing the aws-sdk package from here. Despite trying to find solutions online, I have been unable to resolve this problem. The error message I am facing is: core.js:1673 ERROR Error ...

Persistent CORS issue persists in MEAN Stack despite implementing CORS middleware

Currently, I am building a web application using Angular with NodeJs as the backend. Despite implementing CORS middleware, I am encountering CORS errors. Please take a look at the code snippet below: var mysql = require('mysql'); const fs = requi ...

Learn the process of creating an Angular CLI project following a switch to webpack by utilizing the ng eject command

After experiencing problems with some libraries, I made the switch from Angular CLI to webpack. Within my webpack.config.js file, I manually added a few scripts. Now, how can I compile the angular project without reverting back to CLI? In the past, I util ...

Tips for effectively implementing ngIf on material input within a child component to avoid encountering the ExpressionChangedAfterItHasBeenCheckedError

The issue Encountering an ExpressionChangedAfterItHasBeenCheckedError error while using a PasswordComponent with ng-template. Specifically, wanting to conditionally bind the errorStateMatcher only when controlName === 'confirmPassword'. To view ...

Tips for initializing an Angular 2 application using asynchronous methods

If you're looking to bootstrap an Angular 1 application asynchronously, there's a great resource on how to do it. This method allows you to fetch a JSON file from the server before the application is fully loaded. Here is the main code snippet: ...

Separate sessions for individual tabs in C# WebApi and Angular2+ will be offered

We are currently developing a web application that enables users to access various projects they have created within the platform. Our front-end is built on Angular 4 with a REST Architecture, while the backend utilizes C# Asp.net Web Api. One challenge w ...

Why is my Angular2 reactive form not submitting on button click? (Manually calling form.submit() using getElementById workaround)

When I click on <input type='submit' />, the form is submitted with a POST request and redirects me to mockURL, which is exactly what I want. In xForm.html: <form id="xForm" [formGroup]="xFormGroup" met ...

What are the recommended guidelines for using TypeScript effectively?

When facing difficulties, I have an array with functions, such as: this._array = [handler, func, type] How should I declare this private property? 1. Array<any> 2. any[] 3. T[] 4. Array<T> What is the difference in these declarations? ...

How can you limit a type reference to a specific file in TypeScript?

Currently, I am working on writing universal JavaScript code that can be used in both Node and browser environments. While most of the code works independent of the environment, there are certain parts where different implementations are required based on ...

Utilizing an Observable in an Angular 6 service to ensure proper synchronization with Okta token present in local storage

Within my application, I have implemented third-party authentication to facilitate user login and store a token in their local storage. To enhance the user experience, I am developing a service to cache profile information. This service utilizes the user&a ...

Utilize CSS Styles with Angular 2 Component Selectors

I'm currently diving into Angular 2 and I've been pondering the idea of implementing CSS styles using the component selector in this manner: the component @Component({ selector: 'app', styleUrl: './local.css', te ...

Securing Angular 2: How to Safely Store PassportJS Tokens

How can I retrieve the token generated from the provided express code snippet after a user logs in via Facebook, is stored in the database, and is redirected to /auth/facebook/callback? I want to fetch this token using either callbacks, promises, or obse ...

Angular DOM not reflecting updates

Having trouble with the view not detecting changes in value on a component. I've attempted to use ChangeDetectorRef without success. After trying various solutions and spending an excessive amount of time on something that should work smoothly, it see ...

Renew expired JWT tokens using Angular 11 interceptor in conjunction with a Spring Boot backend

I have been working on a project using spring boot and angular, where users log in from the Angular frontend to the authentication API on Spring Boot to receive a JWT token. To ensure that all requests include this token, I have implemented an interceptor ...

The Angular Pipe is designed to extract values from Enum types in a generic way that can be applied

I am having an issue with enums in my code. The enum contains strings, but it does not work properly with integers as indexes. For example, RoleTypesEnum[0] returns undefined. To solve this problem, I created a custom Pipe. export enum RoleTypesEnum { ...

Issue detected in TypeScript code - "Could not locate property 'setSelectedFile' in type 'void'.ts(2339)"

Encountering a TypeScript error in my code and seeking assistance. Below are the codes of 2 files with the error message included for review. The file causing the error is named "NewPostForm.tsx". import React, { useState } from 'react&apos ...

Leverage TypeScript AngularJS directive's controller as well as other inherited controllers within the directive's link function

I am currently developing an AngularJS directive in TypeScript for form validation. I am trying to understand how to utilize the directive's controller and inherit the form controller within the directive's link function. Thank you in advance! ...

Guide for implementing props in a text area component using React and TypeScript

My react component has a sleek design: import { TextareaHTMLAttributes} from 'react' import styled from 'styled-components' const TextAreaElement = styled.textarea` border-radius: 40px; border: none; background: white; ` const T ...

Steps for deleting a feature from a retail outlet

In my main global module, I have an app store. However, there is a separate lazy-loaded module called the "users" module (accessible through the route /users) that contains a featured store. When I first access the homepage of the application (app module ...