export default from './file' throws Parsing error: Unexpected token './file'
See original GitHub issueWhat version of ESLint are you using? ^2.9.0
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint
Please show your full configuration:
{
"parser" : "babel-eslint",
"extends" : [
"standard",
"standard-react"
],
"env" : {
"browser" : true
},
"globals" : {
"__DEV__" : false,
"__PROD__" : false,
"__DEBUG__" : false,
"__COVERAGE__" : false,
"__BASENAME__" : false
},
"rules": {
"semi" : [2, "never"],
"max-len": [2, 120, 2]
}
}
What did you do? Please include the actual source code causing the issue.
export default from './file'
What did you expect to happen? No errors
What actually happened? Please include the actual, raw output from ESLint.
1:21 error Parsing error: Unexpected token './file'
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top 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 >SyntaxError: Unexpected token 'export' in JavaScript
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type property to module in your package.json file. Files ending with a...
Read more >TypeScript Jest: Unexpected Token Export - Reddit
I'm trying to run unit tests for a TypeScript project which uses another TypeScript project I've created as a dependency.
Read more >Developers - export default from './file' throws Parsing error ...
export default from './file ' throws Parsing error: Unexpected token './file'. ESLint. 15 May 2016 Posted by diegohaz. What version of ESLint are...
Read more >Unexpected Token Export: A Comprehensive Guide
To resolve the uncaught syntaxError unexpected token 'export' error, the programmer has to change the type property to “module” in their package.json file....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is a syntax error. You need curlies:
No, the export-from syntax I listed is valid ES2015 (meaning espree should parse it). The originally posted syntax is not, nor is the syntax in @diegohaz’s follow-up comment.