Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportDeclaration should appear when the mode is ES6 and in the module context. #961

Closed
sibelius opened this issue Oct 27, 2017 · 1 comment

Comments

@sibelius
Copy link

sibelius commented Oct 27, 2017

AssertionError [ERR_ASSERTION]: ImportDeclaration should appear when the mode is ES6 and in the module context.

    at Referencer.ImportDeclaration (app/node_modules/escope/lib/referencer.js:591:34)
    at Referencer.Visitor.visit (app/node_modules/esrecurse/esrecurse.js:122:34)
    at Referencer.Visitor.visitChildren (app/node_modules/esrecurse/esrecurse.js:101:38)
    at Referencer.Program (app/node_modules/escope/lib/referencer.js:419:18)
    at Referencer.Visitor.visit (app/node_modules/esrecurse/esrecurse.js:122:34)
    at Object.analyze (app/node_modules/escope/lib/index.js:153:16)
    at EventEmitter.module.exports.api.verify (app/node_modules/eslint/lib/eslint.js:892:35)
    at processText (app/node_modules/eslint/lib/cli-engine.js:264:31)
    at CLIEngine.executeOnText (app/node_modules/eslint/lib/cli-engine.js:754:26)
    at ESLintPlugin.getErrors (/Applications/WebStorm 2017.1 EAP.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js:83:32)
Process finished with exit code -1

bug here

import type { TagInput } from './__generated__/TagMutation.graphql';

@sibelius
Copy link
Author

fixed here

"parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "modules": true
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant