Illegal import declaration
See original GitHub issueJust updated to 0.17.1 and still getting the error: Illegal import declaration
on the following line.
import request from 'superagent';
And here is my .eslintrc
{
"ecmaFeatures": {
"jsx": true
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"strict": 0,
"no-underscore-dangle": 0,
"quotes": [
2,
"single"
]
}
}
Issue Analytics
- State:
- Created 9 years ago
- Comments:29 (17 by maintainers)
Top Results From Across the Web
Parse Error: Line 1: Illegal import declaration
Save this question. Show activity on this post. I looked online and it appears that the import statement is not recognised unless I...
Read more >Parse Error: Line 1: Illegal import declaration-babel.js
score:1. In the .eslintrc file, enable modules via ecmaFeatures: { modules: true }. See Illegal import declaration - Issue #2112 for additional information....
Read more >eslint/eslint - Gitter
Parse Error: Line 1: Illegal import declaration. import React, { Component } from 'react' .eslintrc "parserOptions" : { "ecmaVersion" : 6, "sourceType" ...
Read more >Illegal import declaration error
Just updated to 0.17.1 and still getting the error: Illegal import declaration on the following line. import request from 'superagent'; And ...
Read more >Text
A BILL To combat illegal deforestation by prohibiting the importation of products ... ``(3) Treatment of products subject to multiple import declaration ......
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 Free
Top 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
this works for me:
You need to enable modules via
ecmaFeatures: { modules: true }