Skip to content

"Rename Symbol" (F2) doesn't ignore node_modules #42367

Closed as not planned
Closed as not planned

Description

  • VSCode Version: Version: 1.52.1
    Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
    Date: 2020-12-16T16:32:10.090Z
    Electron: 9.3.5
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
  • OS Version: Linux x64 5.4.0-62-generic (Linux Mint 19 Cinnamon 64-bit)

Steps to Reproduce:

  1. Create a NodeJS project:
npm init
npm i uuid # probably any lib
code newfile.js
  1. Type:
import * as uuid from 'uuid'
uuid.v4()
  1. Select the v4 function call, press F2 to rename it, type oops, press Enter
  2. A new tab will be opened, showing an index.d.ts file whose v4 string was replaced with oops

There should be an exception for node_modules, probably some warning or blocking, since you shouldn't just rename stuff from there.

Does this issue occur when all extensions are disabled?: Yes

Activity

  1. removed their assignment
    on Jan 16, 2021
  2. jeanp413 commented on Jan 21, 2021

    @jeanp413
    Contributor

    Created a PR #42434 fixing this

  3. RyanCavanaugh commented on Dec 3, 2025

    @RyanCavanaugh
    Member

    Closing language service bugs related to the 6.0 implementation. For more information, see #62827

  4. locked as resolved and limited conversation to collaborators on Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions