Does Visual Studio Code have a builtin formatter for CSS?

Issue VS Code’s builtin language features can format HTML, JS, TS, and JSON. You can use these settings: "[html]": { "editor.defaultFormatter": "vscode.html-language-features" }, "[javascript, javascriptreact, typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, "[json, jsonc]": { "editor.defaultFormatter": "vscode.json-language-features" } I saw in the

Continue reading

I have a problem my localstorage service is string but i need to use number how i do that

Issue this is my service import { Injectable } from ‘@angular/core’; @Injectable({ providedIn: ‘root’, }) export class LocalStorageService { constructor() {} setItem<T>(key: string, object: T) { localStorage.setItem(key, JSON.stringify(object)); } getItem(key: string) { return JSON.parse(localStorage.getItem(key)!); } removeItem(key: string) { localStorage.removeItem(key); }

Continue reading

Unable to use npm in VSCode

Issue I have followed available tutorials and searched around for answers but cannot find them. I have just added the npm package via the extensions tab and restarted the computer. I cannot get npm to be recognized in the terminal:

Continue reading

How to access context.globalState inside a refresh() function of a TreeView class?

Issue I’m trying to access context.globalState.get(‘data’); inside a TreeView refresh() function. My refresh() looks like this: refresh(offset?: number): void { this.ctmInfrastructureCache = getGlobalStateData(); this.parseTree(); if (offset) { this._onDidChangeTreeData.fire(offset); } else { this._onDidChangeTreeData.fire(undefined); } } The global state data is supposed

Continue reading

VS Code "gyp ERR! find VS"

Issue althogh I’ve searched to get this error solved I couldn’t find any proper solution. Visual Studio 2019 with complete C++ developer tools is installed as well as Python. Anyhow I get this error when I install bcryptjs in VSCode:

Continue reading

Image won't show up in html extension in VS Code

Issue I have this code: <!DOCTYPE html> <html> <head> <h1 title="First Heading">Heading 1</h1> <h6 title="Second Heading">Heading 2</h6> </head> <body> <p title="First Paragraph">Paragraph 1</p> <p title="Second Paragraph">Paragraph 2</p> <a href="https://www.w3schools.com/html/html_basic.asp" >W3schools</a> <img src="C:\Users\yorda\OneDrive\Gambar\Aseprite\.jpeg\Canyon.jpeg" alt="Pixel Art" width="320" height="180" </body> </html> If I

Continue reading

When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder

Issue I have a very strange issue with Eslint and Angular. Every time I run ng lint I get errors such as: An unhandled exception occurred: Cannot read config file: [COMPLETELY_DIFFERENT_PROJECT_PATH]\node_modules\eslint-config-prettier@typescript-eslint.js Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier

Continue reading

How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)?

Issue Error on terminal: nodemon.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2 I have a solution to fix the issue by this way: 1. Open Windows PowerShell with Run

Continue reading

TypeScript type cast & D3.js errors

Issue Now, how should I solve this/typecast this? import { useEffect, useState } from "react"; import { arc, pie, DSVRowArray, csv, PieArcDatum } from "d3"; const CSVURL = "https://gist.githubusercontent.com/mzs21/df0621d1ca5a25fa6baeeae93562c1a1/raw/CSSNamedColors.csv"; const width = 960; const height = 500; const centerX =

Continue reading