JSX Identify the problem
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
React class component arrow function cannot be recognized.
Example Content:
import React from 'react'
class test extends React.Component{
constructor(props) {
super(props);
this.state = {
}
}
initData = (item) =>{
}
render() {
return (
)
}
}
export default connect(mapStateToProps)(LinkageSwitchItem)
Steps to reproduce
esprima.parse('some code')
Expected output
Actual output
Relevant references
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reducing the supplied class-component example to an esprima.parse call and determine the parser error or incorrect result. The issue provides no expected or actual AST, named source file, or test, so completion would first require defining the expected JSX and class-property parse behavior, then adding a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100