I’m using Acorn to parse some syntactically valid JavaScript code into an ESTree for further processing. It appears that Acorn does some semantic checks too – in particular it throws an error for duplicate declarations. For example, parsing the following code throws an error of Identifier ‘f’ has already been declared: I do not want such semantic errors to be
Tag: acorn
How to get acornjs to properly style check private class fields and methods?
I’m working on a project where I need to use a style check for my code. I want to use acorn js, however it fails when trying to parse private class fields and class methods. I’ve tried: However it fails when running. This is the error message: I need to be able to use private class fields and methods, but