jsx-eslint/jsx-ast-utils

Nested fragment within prop value errors out

kpcurai opened this issue · 0 comments

Reproduced example using v3.3.4

Error output (value.type here is JSXFragment):

Oops! Something went wrong! :(

ESLint: 8.44.0

TypeError: TYPES[value.type] is not a function
Occurred while linting /Users/xxx/repos/jsx-fragment-issue-repo/src/index.tsx:2
Rule: "jsx-a11y/role-supports-aria-props"
    at getValue (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/values/index.js:56:27)
    at /Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/values/JSXFragment.js:20:12
    at Array.map (<anonymous>)
    at Object.extractValueFromJSXFragment [as JSXFragment] (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/values/JSXFragment.js:19:43)
    at Object.extract [as JSXExpressionContainer] (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/values/expressions/index.js:211:21)
    at getValue (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/values/index.js:56:27)
    at extractValue (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/getPropValue.js:24:12)
    at getPropValue (/Users/xxx/repos/jsx-fragment-issue-repo/node_modules/jsx-ast-utils/lib/getPropValue.js:41:10)
    at /Users/xxx/repos/jsx-fragment-issue-repo/node_modules/eslint-plugin-jsx-a11y/lib/rules/role-supports-aria-props.js:63:48
    at Array.filter (<anonymous>)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.