Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1622717: When parsing an AST allow the chosen parser to override …
…the default scope manager and visitor keys. r=Standard8 There appears to be a bug in babel-eslint where it still uses the old `ExperimentalSpreadProperty` and `ExperimentalRestProperty` node types when babel itself (and hence the AST visitor keys) have switched to `SpreadElement` and `RestElement`. I suspect there isn't much point in filing a babel-eslint issue for this, they are currently in the process of working on v11 which does fix the issue but is currently only available as a beta release. There are three alternatives: 1. Use the beta babel-eslint. 2. Hack the visitor keys to include the old node types. 3. Traverse the AST changing the nodes from the old types to the new types. Using a beta version is probably not a great idea so this patch does 2 which is the simplest of the other options. It does have the drawback however that if any eslint rules we use rely on the new node type names they will fail to work. Differential Revision: https://phabricator.services.mozilla.com/D66998
- Loading branch information