5

I'm using Visual Studio 2015 Update 3. When I try to use Resharper to Refactor my TypeScript code, Resharper tries to refactor code in every folder, including node_modules. Obviously, I do not want Resharper to touch node_modules because those are 3rd party libraries (not my code) and it would probably take 6 hours to try to go through all of those folders I have in node_modules. How do I get Resharper to ignore node_modules in all instances, especially in the Refactor process?

I have already tried the following:

  • Resharper... Options... Search & Navigation... Elements to skip... Add node_modules
  • Resharper... Options... Code Inspection... Settings... Elements to skip... Add node_modules

I also tried changing the node_modules folder to Hidden in its Windows Folder Properties, but Resharper still gets in there for that Refactor process.

What else do I need to do to get Resharper to ignore node_modules?

Targaryen
  • 1,081
  • 2
  • 17
  • 30

1 Answers1

3

Found the solution:

Resharper... Options... Code Editing... Third-Party Code... Library code... Add node_modules

Problem solved!

Targaryen
  • 1,081
  • 2
  • 17
  • 30
  • This gives "Some selected folders are not part of solution and were not added". (https://resharper-support.jetbrains.com/hc/en-us/community/posts/115000087050-Resharper-exclude-node-modules-from-Refactor) – user764754 Mar 14 '18 at 09:08
  • 1
    Use a file mask: node_modules\** – Jason Tarr Sep 11 '18 at 16:07