question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

export as - Parsing error: Unexpected token as

See original GitHub issue

What version of ESLint are you using? 2.8.0

What parser (default, Babel-ESLint, etc.) are you using? “babel-eslint”: “^6.0.2”

Please show your full configuration:

{
    "extends": "airbnb",
    "env" : {
      "jasmine" : true
    },
    parserOptions: {
      "ecmaVersion": 6,
      "ecmaFeatures": {
        "jsx": true,
        "modules": true,
        "experimentalObjectRestSpread": true
      },
    },
    "rules" : {
      "object-curly-spacing" : 0,
      "comma-dangle" : 0,
      "func-names" : 0,
      "max-len": ["error", 150, 2],
      "space-before-function-paren" : 0,
      "react/jsx-indent-props" : 0,
      "react/jsx-closing-bracket-location" : 0,
      "indent" : 0,
      "quotes" : 0,
      "padded-blocks" : 0,
      'no-param-reassign': [2, { 'props': false }]
    }
}

What did you do? Please include the actual source code causing the issue.

index.js:
export * as renderers from './renderers';

What did you expect to happen? valid ES6 to pass

What actually happened? Please include the actual, raw output from ESLint.

/src/index.js
  1:10  error  Parsing error: Unexpected token as

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelficarracommented, May 5, 2016

That’s not ES6.

0reactions
ischyroncommented, May 6, 2016

thanks all! my bad. Not an experimental es6 feature then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

es6 export throws Parsing error: Unexpected token
1 Answer 1 · You get an error because you have invalid export syntax. Try export class App instead. · When you write...
Read more >
ESLint: "Parsing error: Unexpected token" in Visual Studio Code
Unexpected token errors are caused by incompatibilities in your parser options and the code you're writing. In this case, I'm using a number...
Read more >
[ESLint] Parsing error: unexpected token - DEV Community ‍ ‍
What is this article about? This is a solution when I saw these errors. Parsing error: unexpected token =>.
Read more >
LWC1503: Parsing error: Unexpected token
LWC1503: Parsing error: Unexpected token ... Thanks, Vijay. ... Hi Vijay, Here recordId and objectApiName is a variable and you are using it...
Read more >
Component props error - Parsing error: Unexpected token
Component props error - Parsing error: Unexpected token. Newbie here, I have simple code below, basically adding type props to my component ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found