Created
July 28, 2015 19:43
-
-
Save donabrams/f84784ef7fe0a749c4fb to your computer and use it in GitHub Desktop.
Problem with babel-eslint and/or escope?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as escope from 'escope'; | |
| import babelEslint from 'babel-eslint'; | |
| let ast = babelEslint.parse('let a = <div/>;', { | |
| loc: true, | |
| range: true, | |
| raw: true, | |
| tokens: true, | |
| comment: true, | |
| attachComment: true, | |
| ecmaFeatures: { | |
| globalReturn: false, | |
| arrowFunctions: true, | |
| blockBindings: true, | |
| regexUFlag: true, | |
| regexYFlag: true, | |
| templateStrings: true, | |
| binaryLiterals: true, | |
| octalLiterals: true, | |
| unicodeCodePointEscapes: true, | |
| superInFunctions: true, | |
| defaultParams: true, | |
| restParams: true, | |
| forOf: true, | |
| objectLiteralComputedProperties: true, | |
| objectLiteralShorthandMethods: true, | |
| objectLiteralShorthandProperties: true, | |
| objectLiteralDuplicateProperties: true, | |
| generators: true, | |
| destructuring: true, | |
| classes: true, | |
| modules: true, | |
| jsx: true, | |
| }, | |
| }); | |
| escope.analyze(ast, { | |
| ignoreEval: true, | |
| nodejsScope: false, | |
| ecmaVersion: 6, | |
| sourceType: 'module', | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment