Function process2Pokemon
has 53 lines of code (exceeds 25 allowed). Consider refactoring.
process2Pokemon() {
const self = this;
_.forOwn(this.pokemon, function(value: any) {
if(value.moves !== undefined) {
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.type2 !== undefined && value._type2 === undefined) {
value._type2 = value.type2;
value.type2 = _.find(self.types, ['name', _.startCase(_.lowerCase(value.type2))]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.type !== undefined && value._type === undefined) {
value._type = value.type;
value.type = _.find(self.types, ['name', _.startCase(_.lowerCase(value.type))]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.type1 !== undefined && value._type1 === undefined) {
value._type1 = value.type1;
value.type1 = _.find(self.types, ['name', _.startCase(_.lowerCase(value.type1))]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(entry.item !== undefined && entry._item === undefined) {
entry._item = entry.item;
entry.item = _.find(self.items, ['name', _.startCase(_.lowerCase(entry.item))]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.hm !== undefined && value._hm === undefined) {
value._hm = value.hm;
value.hm = _.find(self.moves, ['hm', value.hm]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.hm !== undefined && value._hm === undefined) {
value._hm = value.hm;
value.hm = _.find(self.items, ['_hm', value.hm]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.tm !== undefined && value._tm === undefined) {
value._tm = value.tm;
value.tm = _.find(self.items, ['_tm', value.tm]);
}
Similar blocks of code found in 4 locations. Consider refactoring.
if(value.tm !== undefined && value._tm === undefined) {
value._tm = value.tm;
value.tm = _.find(self.moves, ['tm', value.tm]);
}
" should be '
import { Type } from "../../assets/data/types";
" should be '
this.rawPokemon = this.gd.file("pokemon").data;
" should be '
this.process1(this.rawTypes, this.types, "name");
" should be '
this.process1Alts(this.rawTypes, this.types, "ind", "name");
missing whitespace
if(value.type !== undefined && value._type === undefined) {
missing whitespace
if(value.moves !== undefined) {
" should be '
import { Injectable } from "@angular/core";
" should be '
const _ = window.require("lodash");
" should be '
this.process1Alts(this.rawItems, this.items, "ind", "name");
" should be '
this.process1Alts(this.rawItems, this.items, "ind", "name");
" should be '
import { GameDataService } from "./gameData.service";
" should be '
import { Item } from "../../assets/data/items";
" should be '
this.process1Alts(this.rawMoves, this.moves, "ind", "name");
" should be '
import { Move } from "../../assets/data/moves";
" should be '
this.rawMoves = this.gd.file("moves").data;
missing whitespace
for(let i = 0; i < from.length; i++) {
missing whitespace
if(value.tm !== undefined && value._tm === undefined) {
missing whitespace
if(value.hm !== undefined && value._hm === undefined) {
" should be '
this.process1(this.rawItems, this.items, "name");
missing whitespace
if(value.tm !== undefined && value._tm === undefined) {
if statements must be braced
if(move._move !== undefined)
continue;
else statements must be braced
else
process(value.evolution);
" should be '
this.rawTypes = this.gd.file("types").data;
" should be '
this.process1(this.rawMoves, this.moves, "name");
missing whitespace
for(let i = 0; i < from.length; i++) {
missing whitespace
for(let i = 0; i < value.moves.length; i++) {
if statements must be braced
if(entry._toName !== undefined)
return;
" should be '
import { Pokemon } from "../../assets/data/pokemon";
" should be '
this.process1Alts(this.rawPokemon, this.pokemon, "ind", "name");
" should be '
this.process1Alts(this.rawTypes, this.types, "ind", "name");
" should be '
this.rawItems = this.gd.file("items").data;
" should be '
this.process1(this.rawPokemon, this.pokemon, "name");
" should be '
this.process1Alts(this.rawMoves, this.moves, "ind", "name");
" should be '
this.process1Alts(this.rawPokemon, this.pokemon, "ind", "name");
missing whitespace
if(value.hm !== undefined && value._hm === undefined) {
missing whitespace
if(move._move !== undefined)
missing whitespace
if(value.evolution !== undefined) {
missing whitespace
if(entry.item !== undefined && entry._item === undefined) {
missing whitespace
if(value.tmHm !== undefined && value._tmHm === undefined) {
missing whitespace
for(let i = 0; i < value.evolution.length; i++) {
missing whitespace
if(value.type1 !== undefined && value._type1 === undefined) {
missing whitespace
if(entry._toName !== undefined)
missing whitespace
if(value.initial !== undefined && value._initial === undefined) {
missing whitespace
for(let i = 0; i < value.initial.length; i++) {
missing whitespace
if(value.type2 !== undefined && value._type2 === undefined) {
missing whitespace
if(Array.isArray(value.evolution)) {
missing whitespace
for(let i = 0; i < value.tmHm.length; i++) {
There are no issues that match your filters.