visual-studio-code

How to disable prettier settings creating new line of > of html tag?

妖精的绣舞 提交于 2020-12-01 09:13:15
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

一笑奈何 提交于 2020-12-01 09:13:13
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

 ̄綄美尐妖づ 提交于 2020-12-01 09:12:31
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

时光总嘲笑我的痴心妄想 提交于 2020-12-01 09:12:24
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How can I remove unused imports/declarations from the entire project of React Typescript?

一世执手 提交于 2020-12-01 07:26:24
问题 I'm trying to remove unused imports and declarations as answered in this SO thread for Angular. I'm trying to achieve the goal using eslint-plugin-react, but not found any option to remove the unused imports and daclarations from the entire project, with a single command. Here is my .eslintrc.json { "env": { "browser": true, "es2021": true }, "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser",

How do I get flake8 to reliably ignore rules in VS Code?

别等时光非礼了梦想. 提交于 2020-11-30 02:14:07
问题 Two things that annoy me. First is the warning Flake8 gives me when I type more than 80 characters on a line. Second is the warnings I get when I haven't yet used a module name that I imported. I've looked at all the documentation on using Flake8 in the terminal. No use. flake8 --ignore=E402 flake8 --max-line-length=120 This doesn't work. At least VS Code doesn't show any effect. 回答1: Add your arguments to your USER SETTINGS json file like this: "python.linting.flake8Args": [ "--max-line

Split window space equally in vscode

℡╲_俬逩灬. 提交于 2020-11-29 08:40:04
问题 Is there a shortcut, hotkey, or any other way of centering the scrollbars which split the windows in vscode? Ideally I'd like to be able quickly recenter the windows, and ensure each has the same amount of space, but I dont see a way to do this inside any of the commands. 回答1: This can be done using the workbench.action.evenEditorWidths action, you can either look it up in the command palette: ctrl + shift + p Type even enter Or define a keybinding in your keyboard shortcuts file: { "key":

Problem to run chrome debugger in VS Code

主宰稳场 提交于 2020-11-29 04:25:17
问题 Hi I've got a problem to run Chrome Debugger directly in VS Code. I'm working on Linux Mint. Now i try to run debugger and error message says: Unable to launch browser: "Unable to find Chrome version stable. Available auto-discovered versions are: ["dev"]. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable." Following the sugesstion I've added runtimeExecutable to chromeExecutable and now the error is: Unable to

Problem to run chrome debugger in VS Code

三世轮回 提交于 2020-11-29 04:24:54
问题 Hi I've got a problem to run Chrome Debugger directly in VS Code. I'm working on Linux Mint. Now i try to run debugger and error message says: Unable to launch browser: "Unable to find Chrome version stable. Available auto-discovered versions are: ["dev"]. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable." Following the sugesstion I've added runtimeExecutable to chromeExecutable and now the error is: Unable to

VSCode: How do I find what my workspace folder is

早过忘川 提交于 2020-11-28 08:17:24
问题 Is there a simple command that will tell me what my workspace folder is? I tried ${workspaceFolder} in the terminal but that didn't work. 回答1: Alternatives that currently come to my mind: 1.) If you want to see the workspace folder in the titlebar, you could adjust window.title setting (workspace or user settings): "window.title": "${dirty}${activeEditorShort}${separator}${folderPath}${separator}${appName}" Multiple variables can be used here - see Defaults -> window.title. ${folderPath}