codecrumbs icon indicating copy to clipboard operation
codecrumbs copied to clipboard

Cannot parse certain ES6+ syntaxes

Open neutraali opened this issue 6 years ago • 1 comments

( Possibly related to js2flowchart )

When trying to parse certain ES6+ syntax, the AST parser throw an error:

Error at parseCodeToAST: This experimental syntax requires enabling the parser plugin: 'classProperties' (XX:YY)

An example of this code would be:

class ExampleComponent extends React.Component {
	constructor(props) {
		super(props)
	}
	// Error triggers on the line below
	state = {
		isLoading: false
	}
	// . . .
}

How does one enable classProperties over @ codecrumbs?

neutraali avatar Jun 24 '19 07:06 neutraali

@neutraali that code works well for me, maybe you have some global overwrite option for eslint?

idoo avatar Jul 23 '19 11:07 idoo