esprima icon indicating copy to clipboard operation
esprima copied to clipboard

JSX Identify the problem

Open enjoy-wind opened this issue 4 years ago • 3 comments

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

enjoy-wind avatar Nov 25 '21 12:11 enjoy-wind

maybe try my fork, esprima-next

jogibear9988 avatar Jan 01 '22 12:01 jogibear9988

I have fixed this issue myself, what attempts to support VUE.

enjoy-wind avatar Jan 01 '22 12:01 enjoy-wind

I've seen your commit, but it could happen again, and I don't see much development here...

jogibear9988 avatar Jan 01 '22 15:01 jogibear9988