When using javascript (es2015) imports the Intellisense seems to be broken.
When I am working in the same file, VSC autosuggests the methods from the object with the correct JSDoc information.
However, when importing the Class in another file, the Intellisense seems to be pletely broken ( david.david, wtf? ).
Do I need to adjust any settings in Visual Studio Code to get this working? I tried adjusted my jsconfig file to es2015 imports and es6 as but that didn't work.
My jsconfig.json:
{
"pilerOptions": {
"module": "es6"
}
}
When using javascript (es2015) imports the Intellisense seems to be broken.
When I am working in the same file, VSC autosuggests the methods from the object with the correct JSDoc information.
However, when importing the Class in another file, the Intellisense seems to be pletely broken ( david.david, wtf? ).
Do I need to adjust any settings in Visual Studio Code to get this working? I tried adjusted my jsconfig file to es2015 imports and es6 as but that didn't work.
My jsconfig.json:
{
"pilerOptions": {
"module": "es6"
}
}
Share
Improve this question
edited Apr 1, 2016 at 14:11
koningdavid
asked Apr 1, 2016 at 14:01
koningdavidkoningdavid
8,1137 gold badges37 silver badges47 bronze badges
2
- I had a lot of issues using es2015 in Code. Ended up scrapping it and went back to atom... – erichardson30 Commented Apr 1, 2016 at 14:06
- I have seem to found the issue here github./Microsoft/vscode-react-native/issues/61 it's a known bug – koningdavid Commented Apr 1, 2016 at 14:17
1 Answer
Reset to default 11Because you are using export
without default
you need to enable allowSyntheticDefaultImports
{
"pilerOptions": {
"target": "es6",
"allowSyntheticDefaultImports": true
}
}
The same occurs with
import fs from 'fs';
import axios from 'axios';
And others.