spolnik/JAlgoArena-UI

View on GitHub

Showing 386 of 386 total issues

File lodash_v4.x.x.js has 5178 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// flow-typed signature: 2d6372509af898546ea7b44735f2557d
// flow-typed version: 8c150a1c24/lodash_v4.x.x/flow_>=v0.63.x
 
declare module "lodash" {
declare type __CurriedFunction1<A, R, AA: A> = (...r: [AA]) => R;
Severity: Major
Found in flow-typed/npm/lodash_v4.x.x.js - About 2 wks to fix

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

    export const RegionRankingTable = (props: RegionRankingTableProps) => {
    let regions = _.groupBy(props.ranking, 'region');
    let regionsRank = _.orderBy(_.map(regions, (rankNodes, region) => {
    return {region: region, score: _.sumBy(rankNodes, 'score'), size: rankNodes.length};
    }), ['score'], ['desc']);
    Severity: Major
    Found in src/client/ranking/components/RegionRankingTable.tsx and 1 other location - About 1 day to fix
    src/client/ranking/components/TeamRankingTable.tsx on lines 11..42

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

    export const TeamRankingTable = (props: TeamRankingTableProps) => {
    let teams = _.groupBy(props.ranking, 'team');
    let teamsRank = _.orderBy(_.map(teams, (rankNodes, team) => {
    return {team: team, score: _.sumBy(rankNodes, 'score'), size: rankNodes.length};
    }), ['score'], ['desc']);
    Severity: Major
    Found in src/client/ranking/components/TeamRankingTable.tsx and 1 other location - About 1 day to fix
    src/client/ranking/components/RegionRankingTable.tsx on lines 11..42

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type Curry = (<A, R>((...r: [A]) => R) => CurriedFunction1<A, R>) &
    (<A, B, R>((...r: [A, B]) => R) => CurriedFunction2<A, B, R>) &
    (<A, B, C, R>((...r: [A, B, C]) => R) => CurriedFunction3<A, B, C, R>) &
    (<A, B, C, D, R>(
    (...r: [A, B, C, D]) => R
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 122..133

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type Curry = (<A, R>((...r: [A]) => R) => CurriedFunction1<A, R>) &
    (<A, B, R>((...r: [A, B]) => R) => CurriedFunction2<A, B, R>) &
    (<A, B, C, R>((...r: [A, B, C]) => R) => CurriedFunction3<A, B, C, R>) &
    (<A, B, C, D, R>(
    (...r: [A, B, C, D]) => R
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1543..1554

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction6<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1507..1526

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction6<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 86..105

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction5<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1476..1492

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction5<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 1 day to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 55..71

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

    return (dispatch: Dispatch<Action>) => {
    return fetch(`/api/ranking/api/ranking/${dateToFetch}`, options)
    .then((response) => response.json())
    .then((json) => {
    if (json.error) {
    Severity: Major
    Found in src/client/ranking/actions/index.ts and 1 other location - About 6 hrs to fix
    src/client/ranking/actions/index.ts on lines 27..38

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

    return (dispatch: Dispatch<Action>) => {
    return fetch(`/api/ranking/api/ranking/problem/${problemId}`, options)
    .then((response) => response.json())
    .then((json) => {
    if (json.error) {
    Severity: Major
    Found in src/client/ranking/actions/index.ts and 1 other location - About 6 hrs to fix
    src/client/ranking/actions/index.ts on lines 111..122

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction4<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 6 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 29..42

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    declare type __CurriedFunction4<
    A,
    B,
    C,
    D,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 1 other location - About 6 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 1450..1463

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

    class TeamRanking extends React.Component<TeamRankingProps, {}> {
     
    componentDidMount() {
    this.props.onLoad();
    }
    Severity: Major
    Found in src/client/ranking/pages/teamRanking.tsx and 1 other location - About 5 hrs to fix
    src/client/ranking/pages/regionRanking.tsx on lines 16..35

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

    class RegionRanking extends React.Component<RegionRankingProps, {}> {
     
    componentDidMount() {
    this.props.onLoad();
    }
    Severity: Major
    Found in src/client/ranking/pages/regionRanking.tsx and 1 other location - About 5 hrs to fix
    src/client/ranking/pages/teamRanking.tsx on lines 16..35

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

    export function submissions(state: SubmissionsState = {
    items: [],
    statusFilter: 'ALL',
    problemsSolutionsRatio: [],
    stats: []
    Severity: Major
    Found in src/client/submissions/reducers/index.ts and 1 other location - About 5 hrs to fix
    src/client/problems/reducers/index.ts on lines 60..93

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

    export function problems(
    state: ProblemsState = {
    items: [],
    currentProblemId: null,
    difficultyFilter: 0,
    Severity: Major
    Found in src/client/problems/reducers/index.ts and 1 other location - About 5 hrs to fix
    src/client/submissions/reducers/index.ts on lines 22..48

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

    extendWith<T: Object, A: Object, B: Object, C: Object, D: Object>(
    object: T,
    s1: A,
    s2: B,
    s3: C,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 4 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 976..989
    flow-typed/npm/lodash_v4.x.x.js on lines 1027..1040
    flow-typed/npm/lodash_v4.x.x.js on lines 1197..1210

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

    assignWith<T: Object, A: Object, B: Object, C: Object, D: Object>(
    object: T,
    s1: A,
    s2: B,
    s3: C,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 4 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 976..989
    flow-typed/npm/lodash_v4.x.x.js on lines 1093..1106
    flow-typed/npm/lodash_v4.x.x.js on lines 1197..1210

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

    mergeWith<T: Object, A: Object, B: Object, C: Object, D: Object>(
    object: T,
    s1: A,
    s2: B,
    s3: C,
    Severity: Major
    Found in flow-typed/npm/lodash_v4.x.x.js and 3 other locations - About 4 hrs to fix
    flow-typed/npm/lodash_v4.x.x.js on lines 976..989
    flow-typed/npm/lodash_v4.x.x.js on lines 1027..1040
    flow-typed/npm/lodash_v4.x.x.js on lines 1093..1106
    Severity
    Category
    Status
    Source
    Language