Is there a way to remove unused imports and declarations from Angular 2+? [closed]

Edit (as suggested in comments and other people), Visual Studio Code has evolved and provides this functionality in-built as the command “Organize imports”, with the following default keyboard shortcuts: option+Shift+O for Mac Alt + Shift + O for Windows Original answer: I hope this visual studio code extension will suffice your need: https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero It provides … Read more

TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app

To fix this issue simply upgrade react-scripts package (check latest version with npm info react-scripts version): Replace in your package.json “react-scripts”: “^3.x.x” with “react-scripts”: “^3.4.1” (or the latest available version) (optional for some) Delete your node_modules folder Run npm install or yarn install Some people reported that this issue was caused by running npm audit … Read more

How can I clear the terminal in Visual Studio Code?

Use Ctrl+K. This goes clean your console in Visual Studio Code. Per comments, in later versions of VSCode (1.29 and above) this shortcut is missing / needs to be created manually. Navigate: File > Preferences > Keyboard Shortcuts search for workbench.action.terminal.clear If it has no mapping or you wish to change the mapping, continue; otherwise … Read more

How do you reference a capture group with regex find and replace in Visual Studio 2012, 2013, 2015, and VS Code

To find and replace in VS 2012 and VS 2015 you do the following: Surround with (), display capture with $1, $2, $n Example (thanks to syonip) In the find options, make sure ‘use regular expressions’ is checked, and put the following as the text to find: _platformActions.InstallApp\((.+)\) And the following as the text to … Read more