Skip to content

Instantly share code, notes, and snippets.

@amoutonbrady
Created November 3, 2018 21:04
Show Gist options
  • Save amoutonbrady/d80681f6d57721290b5079a4c950a772 to your computer and use it in GitHub Desktop.
Save amoutonbrady/d80681f6d57721290b5079a4c950a772 to your computer and use it in GitHub Desktop.
Regex to remove tsc --init default config comments
  1. Go into VSCode
  2. Install typescript npm i typescriptfor local OR npm i -g typescript for global
  3. Run either node_modules/.bin/tsc --init for local installation or tsc --init for global
  4. Open the generated file tsconfig.json and press CTRL+F
  5. Make sure to tick the regex filter for search on the far right of the search input (third icon)
  6. Pase that regex \s* \/\* .* \*\/
  7. Replace by "nothing"
@HighLiuk
Copy link

Just in case you need to remove // comments and \n\n too: \s* \/\* .* \*\/|\s*//.+|\n\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment