Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested fragment within prop value errors out #132

Closed
kpcurai opened this issue Jul 10, 2023 · 0 comments
Closed

Nested fragment within prop value errors out #132

kpcurai opened this issue Jul 10, 2023 · 0 comments

Comments

@kpcurai
Copy link

kpcurai commented Jul 10, 2023

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.
@ljharb ljharb closed this as completed in 8798c58 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant