Giter Site home page Giter Site logo

Comments (8)

jessebeach avatar jessebeach commented on May 27, 2024 3

Working on it now. I need to update all the dev dependencies to get there :)

from jsx-ast-utils.

jessebeach avatar jessebeach commented on May 27, 2024 2

@HsuTing , Fixed in version v2.2.1. This will log an error in the console, but it will no longer throw.

from jsx-ast-utils.

pdong avatar pdong commented on May 27, 2024

I am seeing this with .title as well

{data?.title} will error out with

The prop value with an expression type of OptionalMemberExpression could not be resolved.
  Please file issue to get this fixed immediately.
Error: The prop value with an expression type of OptionalMemberExpression could not be resolved.
  Please file issue to get this fixed immediately.
    at Object.extractLiteral [as JSXExpressionContainer] (/Users/pdong/node_modules/jsx-ast-utils/lib/values/expressions/index.js:202:11)
    at getLiteralValue (/Users/pdong/node_modules/jsx-ast-utils/lib/values/index.js:61:35)
    at extractValue (/Users/pdong/node_modules/jsx-ast-utils/lib/getPropValue.js:24:12)
    at getLiteralPropValue (/Users/pdong/node_modules/jsx-ast-utils/lib/getPropValue.js:56:10)
    at JSXAttribute (/Users/pdong/node_modules/eslint-plugin-jsx-a11y/lib/rules/aria-proptypes.js:88:58)
    at listeners.(anonymous function).forEach.listener (/Users/pdong/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/pdong/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/pdong/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/pdong/node_modules/eslint/lib/util/node-event-generator.js:280:22)

but if I change it it works. 🤔

Wondering if this is broken for all valid html attrs maybe 🤷‍♂️

from jsx-ast-utils.

HsuTing avatar HsuTing commented on May 27, 2024

@jessebeach OK, thank for your help.

from jsx-ast-utils.

MathiasKandelborg avatar MathiasKandelborg commented on May 27, 2024

Could we not get this error? The message comes from here, following the issue trail from eslint.

If there is an error/bug, it should get fixed, if it's a false report, I don't want to see it.

from jsx-ast-utils.

jessebeach avatar jessebeach commented on May 27, 2024

@MathiasKandelborg I understand the frustration here. I feel it, too. I hate seeing these bugs pop up. I'll look into it this weekend and put out a patch release.

from jsx-ast-utils.

ljharb avatar ljharb commented on May 27, 2024

note that v3.0 of jsx-ast-utils is out, and eslint-plugin-jsx-a11y has been updated with it, but not yet released - so a patch release here would still need a release in eslint-plugin-jsx-a11y.

It's also possible this is already fixed in v3.0.

from jsx-ast-utils.

ljharb avatar ljharb commented on May 27, 2024

Pretty sure this is fixed by #77. eslint-pliugin-react has already been updated with it, and eslint-plugin-jsx-a11y will get it on the next release.

from jsx-ast-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.