Are you bundling your javascript before serving it, or is all the code in the main.js file? It seems that YCM is using tsserver for javascript completion which would explain why you need the import statement to get it to work. If you are bundling, then you don't need to import D3 in your HTML file, and YCM should give correct completion without having to comment and uncomment your import statement every time you edit / save the file.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Are you bundling your javascript before serving it, or is all the code in the
main.js
file? It seems that YCM is using tsserver for javascript completion which would explain why you need theimport
statement to get it to work. If you are bundling, then you don't need to import D3 in your HTML file, and YCM should give correct completion without having to comment and uncomment your import statement every time you edit / save the file.