Skip to content

Error: VariableDeclarator ASTNodes are not handled by markPropTypesAsUsed #2319

Closed
@johnridesabike

Description

@johnridesabike

ESLint started crashing with this error shortly after I upgraded to 7.14.0.

I suspect it's related to prop destructuring. I tried opening different JSX files and ESLint didn't seem to have a problem except for files with components that destructure their props.

Full error log:

[Error - 8:04:55 PM] ESLint stack trace:
[Error - 8:04:55 PM] Error: VariableDeclarator ASTNodes are not handled by markPropTypesAsUsed
Occurred while linting /Users/.../src/pages/tournament/status.jsx:8
    at markPropTypesAsUsed (/Users/.../node_modules/eslint-plugin-react/lib/util/usedPropTypes.js:338:15)
    at Object.VariableDeclarator (/Users/.../node_modules/eslint-plugin-react/lib/util/usedPropTypes.js:492:9)
    at updatedRuleInstructions.(anonymous function) (/Users/.../node_modules/eslint-plugin-react/lib/util/Components.js:780:47)
    at listeners.(anonymous function).forEach.listener (/Users/.../node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/.../node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/.../node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/.../node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/Users/.../node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/Users/.../node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)

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