Skip to content

Maximum call stack size exceeded with no-danger-with-children rule #1571

@mockdeep

Description

@mockdeep

I made a typo in one of my tests, and got a weird "RangeError" from ESLint. I would have expected some sort of error maybe complaining about invalid syntax or something, but this one in particular was hard to trace. The code looks like:

const props = {...props, scratch: {mode: 'edit'}};
const component = shallow(<TaskEditableTitle {...props} />);

The error that came out:

Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at ScopeManager.__get (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-scope/lib/scope-manager.js:85:10)
    at ScopeManager.acquire (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-scope/lib/scope-manager.js:127:29)
    at getScope (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint/lib/linter.js:613:36)
    at Object.getScope (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint/lib/linter.js:843:37)
    at Object.variablesInScope (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-plugin-react/lib/util/variable.js:36:23)
    at findSpreadVariable (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:23:27)
    at node.properties.find.prop (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:38:28)
    at Array.find (native)
    at findObjectProp (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:34:30)
    at node.properties.find.prop (/home/fletch/Dropbox/projects/web_apps/questlog/node_modules/eslint-plugin-react/lib/rules/no-danger-with-children.js:40:20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy