← All tasks
javascriptjsx-eslint/eslint-plugin-jsx-a11y #747Not a task: not reproduced

Upgrade jsx-ast-utils to support Optional Chaining (tracking issue)

envgap__jsx-eslint__eslint-plugin-jsx-a11y-747

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
1834668927e9c6b470f39f4bcaed113dc38e4b8d
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

jsx-eslint/eslint-plugin-jsx-a11y #747 · read the original issue
I opened an issue upstream on jsx-ast-utils: https://github.com/jsx-eslint/jsx-ast-utils/issues/103 . The fix will have to occur there, and then this package should be updated to depend on (or at least accept in the semver range) the new version.



## Symptom:

Began seeing `The prop value with an expression type of ChainExpression could not be resolved. Please file issue to get this fixed immediately.` in eslint output after upgrading.



ECMAscript Optional Chaining shipped, resulting in various changes to parsers and javascript/typescript tools to support it. Initially there were different, non-standard names for the AST nodes to represent it. Over this year, consensus has settled out, including in the parser that eslint uses, estree (see https://github.com/estree/estree/pull/204 ).



## Versions:

eslint@7.10.0

jsx-ast-utils@2.4.1 (via eslint-plugin-react@7.21.3, eslint-plugin-jsx-a11y@6.3.1)



## Minimal test case

Component.jsx

```

import React from 'react';



export function Component() {

  const x = {};

  return (

    <div role="button" key={x.y?.z}>

      hi

    </div>

  );

}



```



.eslintrc

```

module.exports = {

  extends: [

    'plugin:react/recommended',

    'plugin:jsx-a11y/recommended'

  ],

  plugins: ['react', 'jsx-a11y'],

}

```



run

```

eslint ./Component.jsx

```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]