Skip to content

RangeError: Maximum call stack size exceeded #2861

Closed
@avi-dwave

Description

@avi-dwave

Environment Info:

  • Node version: v10.23.0
  • npm version: v6.14.8
  • Local ESLint version: v7.13.0
  • Global ESLint version: v7.13.0 (Currently used)

Command Run

eslint ./assets/js/shared/component/partial/ProfileFlyoutV2/ProfileFlyoutV2.jsx

Output

Oops! Something went wrong! :(

ESLint: 7.13.0

RangeError: Maximum call stack size exceeded
Occurred while linting /home/developer/work/sapi/qubist/metalab-cloud-service/assets/js/shared/component/partial/ProfileFlyoutV2/ProfileFlyoutV2.jsx:97
    at Array.join (native)
    at iterateProperties (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:445:55)
    at iterateProperties (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:65:7)
    at buildReactDeclarationTypes (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:443:11)
    at buildReactDeclarationTypes (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:458:25)
    at iterateProperties (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:446:29)
    at iterateProperties (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:65:7)
    at buildReactDeclarationTypes (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:443:11)
    at buildReactDeclarationTypes (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:458:25)
    at iterateProperties (/home/developer/work/sapi/qubist/metalab-cloud-service/node_modules/eslint-plugin-react/lib/util/propTypes.js:446:29)

ProfileFlyoutV2.jsx lines 88-103

const projectType = PropTypes.shape({
  id: PropTypes.string.isRequired,
  name: PropTypes.string.isRequired,
});

const nodesType = PropTypes.arrayOf(
  PropTypes.shape({ project: projectType, children: nodesType }),
);

ProjectNode.propTypes = { // line 97 where the error occurs
  project: projectType.isRequired,
  nodes: nodesType,
  depth: PropTypes.number.isRequired,
  setActiveProject: PropTypes.func.isRequired,
  activeProject: projectType,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions