scottohara/loot

View on GitHub
src/accounts/controllers/index.ts

Summary

Maintainability
A
3 hrs
Test Coverage
A
100%

Function deleteAccount has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public deleteAccount(accountType: string, index: number): void {
        // Check if the account can be deleted
        this.accountModel
            .find(Number(this.accounts[accountType].accounts[index].id))
            .then((account: Account): void => {
Severity: Minor
Found in src/accounts/controllers/index.ts - About 1 hr to fix

    Function editAccount has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public editAccount(accountType?: string, index?: number): void {
            // Helper function to sort by account name
            function byName(a: Account, b: Account): number {
                return a.name.localeCompare(b.name);
            }
    Severity: Minor
    Found in src/accounts/controllers/index.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status