Skip to content

Instantly share code, notes, and snippets.

@GongT
Created July 22, 2026 21:14
Show Gist options
  • Select an option

  • Save GongT/6f482b92d5c0ace6fb7669a8010533c9 to your computer and use it in GitHub Desktop.

Select an option

Save GongT/6f482b92d5c0ace6fb7669a8010533c9 to your computer and use it in GitHub Desktop.
prevent typescript auto import in VSCode showing node internal modules without "node:" schema
{
"js/ts.preferences.autoImportSpecifierExcludeRegexes": [
// node -p 'require("node:module").builtinModules.filter(e => !/^(_|node:)/.test(e)).join("|")'
"^(assert|assert/strict|async_hooks|buffer|child_process|cluster|console|constants|crypto|dgram|diagnostics_channel|dns|dns/promises|domain|events|fs|fs/promises|http|http2|https|inspector|inspector/promises|module|net|os|path|path/posix|path/win32|perf_hooks|process|punycode|querystring|readline|readline/promises|repl|stream|stream/consumers|stream/promises|stream/web|string_decoder|sys|timers|timers/promises|tls|trace_events|tty|url|util|util/types|v8|vm|wasi|worker_threads|zlib)$",
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment