Content-Length: 317004 | pFad | https://redirect.github.com/jsx-eslint/eslint-plugin-react/issues/1178

36 [prop-types] It crash eslint when using spread operator in a flow type · Issue #1178 · jsx-eslint/eslint-plugin-react · GitHub
Skip to content

[prop-types] It crash eslint when using spread operator in a flow type #1178

@lgraziani2712

Description

@lgraziani2712

Hello! This code crashs eslint:

type RawMazeData = {|
  ...MazeData,
  path: Array<[string, ActivePathBorders]>,
|};
Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined
    at buildTypeAnnotationDeclarationTypes (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:452:25)
    at C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:464:54
    at iterateProperties (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:333:11)
    at buildTypeAnnotationDeclarationTypes (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:463:11)
    at buildTypeAnnotationDeclarationTypes (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:455:20)
    at C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:464:54
    at iterateProperties (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:333:11)
    at buildTypeAnnotationDeclarationTypes (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:463:11)
    at C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:681:38
    at iterateProperties (C:\dev\repos\codimo\node_modules\eslint-plugin-react\lib\rules\prop-types.js:333:11)

Edit: disabling this rules does not happen.

Thank you!

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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://redirect.github.com/jsx-eslint/eslint-plugin-react/issues/1178

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy