I cannot figure out why some methods and properties don’t highlight (or other methods of indications) in the VS code. For example (in my case): Methods and properties of the event object don’t indicate like methods and properties and it makes me being so confused and when I hover over them and the…
Tag: visual-studio-code
Using import inside lib.d.ts for intellisense in Visual Studio Code
I have a set of custom global variables in my JavaScript project and I want to use VSCode intellisense to help me with auto completion like this: auto completion for lol After some googling I found a way to use lib.d.ts in the same directory as the script. If lib.d.ts doesn’t refer other files like this…
How to comment out a HTML tag in .Vue ‘s template
Recently, I’m start learning Vue and using Vue-Cli. There’s a problem that I can not use hot-key(VSCode) to comment out a HTML tag in the . when I use “Ctrl+/” the line I want to comment out turns like this. not like this. Is there any possibility that I changed some setting in the VSC…
why doesn’t my live server work in visual studio code?
My live server on visual studio keeps opening an old html file when i try to open my current one. Ive tried reinstalling the extension but its the same problem. Can anyone help please Answer i cannot have two project folders with an html file running through the live server. Only one html file can be streamed…
javascript function to search like in vscode files
I’m trying to understand how to make a dropdown search function in javscript that works like file-search CTRL+P in vscode. The search query to be automatically including wildcards. For example i type inds and vscode finds index.js file. How to make something similar in javscript using indexOf for exampl…
Debugging Sanity exec with VS Code
I’m using Sanity (sanity.io headless CMS) and doing some data migration with the CLI. How do I (or, is it at all possible) to some how attach the vscode debugger and stop at breakpoints in migration scripts. I’m running the following cli migration script: sanity exec migrate.js –with-user-to…
VSCODE Javascript template string become white and lost highlight in a non deterministic way
I don’t know exactly how to express it in words to find related problems. In some cases, apparently random, when using JavaScript string templates, the text editor loses becomes white, with bold text and makes editing the code very difficult. First appearance of the problem was when I started working wi…
How is ESLint integrated into Create React App?
When I run npx create-react-app …, a bare-bone React project is being created for me. When I then peek into package.json, there seems to be some evidence of ESLint to be present, as there is this: However, whenever I install ESLint as a dev dependency and configure it — as I usually do –, VS…
How to intellisense alias module path in VSCode
I would like VSCode to IntelliSense the module path so I can access it by click. For example, after configurating jsconfig.json I’m able to access ./src/styled/index by importing its global path. But I couldn’t figure out how to make it work with an alias @styles My current jsconfig.json: Answer S…
How to get Visual Studio Code to navigate to a React component’s source file?
Consider a typical ReactJS file, like: In VS Code, I want to go to the file that is my component, so jump to components/Popup/Popup. Using Go To Definition: It sends me up to the import declaration. I can’t jump to that file. This is a pain to manage as we have dozens of components and properties moving…