junebug12851/pokered-save-editor

View on GitHub
src/app/fragments/name-input-box/name-input-box.component.ts

Summary

Maintainability
A
40 mins
Test Coverage

Showing 15 of 15 total issues

Similar blocks of code found in 20 locations. Consider refactoring.
Open

@Component({
selector: 'name-input-box',
templateUrl: './name-input-box.component.pug',
styleUrls: ['./name-input-box.component.scss'],
providers: [
Severity: Major
Found in src/app/fragments/name-input-box/name-input-box.component.ts and 19 other locations - About 40 mins to fix
src/app/fragments/connection-item/connection-item.component.ts on lines 25..48
src/app/fragments/entry-item/entry-item.component.ts on lines 24..54
src/app/fragments/name-input/name-input.component.ts on lines 27..114
src/app/fragments/select-item/select-item.component.ts on lines 32..104
src/app/fragments/select-map-full/select-map-full.component.ts on lines 32..99
src/app/fragments/select-map-width/select-map-width.component.ts on lines 32..121
src/app/fragments/select-map/select-map.component.ts on lines 33..94
src/app/fragments/select-missable/select-missable.component.ts on lines 31..61
src/app/fragments/select-moves/select-moves.component.ts on lines 34..151
src/app/fragments/select-player-direction/select-player-directionr.component.ts on lines 24..39
src/app/fragments/select-species/select-species.component.ts on lines 32..91
src/app/fragments/select-sprite/select-sprite.component.ts on lines 29..59
src/app/fragments/select-starter/select-starter.component.ts on lines 24..37
src/app/fragments/select-status/select-status.component.ts on lines 24..40
src/app/fragments/select-trainer/select-trainer.component.ts on lines 31..61
src/app/fragments/select-type/select-type.component.ts on lines 25..51
src/app/fragments/sign-item/sign-item.component.ts on lines 24..54
src/app/fragments/warp-item/warp-item.component.ts on lines 24..54
src/app/fragments/wild-pokemon-item/wild-pokemon-item.component.ts on lines 24..95

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public textBlack: boolean = true;

In the class "NameInputBoxComponent", the output property "onChangeInternal" should not be prefixed with on
Open

@Output()
public onChangeInternal = new EventEmitter<Uint8Array>();

In the class "NameInputBoxComponent", the output property "onChangeHTML" should not be prefixed with on
Open

@Output()
public onChangeHTML = new EventEmitter<string>();

Declaration of instance method not allowed after declaration of instance field. Instead, this should come at the beginning of the class/interface.
Open

public doOnChangeHTML(event: any) {
// Relay event
this.onChangeHTML.emit(event);
}

Type string trivially inferred from a string literal, remove type annotation
Open

public template: string = "";

In the class "NameInputBoxComponent", the output property "onChangeValue" should not be prefixed with on
Open

@Output()
public onChangeValue = new EventEmitter<string>();

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public disabled: boolean = false;

Declaration of instance method not allowed after declaration of instance field. Instead, this should come at the beginning of the class/interface.
Open

public doOnChangeInternal(event: any) {
// Relay event
this.onChangeInternal.emit(event);
}

Declaration of instance method not allowed after declaration of instance field. Instead, this should come at the beginning of the class/interface.
Open

public doOnChangeValue(event: any) {
// Relay event
this.onChangeValue.emit(event);
}

Type number trivially inferred from a number literal, remove type annotation
Open

public maxLength: number = 10;

Type string trivially inferred from a string literal, remove type annotation
Open

public label: string = "";

Type boolean trivially inferred from a boolean literal, remove type annotation
Open

public bg: boolean = true;

" should be '
Open

public label: string = "";

" should be '
Open

public template: string = "";
Category
Status