Use Rider for JavaScript projects

I mostly work with .NET but sometimes I need to work on pure JS projects. I open such projects from file system folder (no *.sln file, no *.csproj file). I don't want to keep both tools around. As I work with .NET and Databases the obvious choice would be Rider but it is a pain...

Refactoring (renaming) is slow as Rider tries to search in node_modules folder too. Search in File is almost not usable. It find a ton on unrelates stuff in node_modules and package-lock.json.

In WebStrom you can configure Directories, exclude folders and files from Project. Is there anything like that in Rider for non-.NET projects?

0
5 comments

Hi Kutynko

You can exclude any folder from analyzing and indexing.

Do the following:

  1. Click on the cog icon in Solution Explorer -> Show All Files.
  2. Right-click on 'node_modules' folder and choose `Exclude`
  3. Right-click on 'node_modules' folder -> Tools -> Stop index

Please, let me know how it works for you. Thanks! 

0

Hi Alexandra Guk

Thank you very much for your reply. As I wrote in the first post sometimes I need to work on pure front-end projects. I open them as a folder. So there is no Solution file, no "Show All Files" button in Explorer.

I found the "Stop index" menu. It definitely helps with some refactorings like "Rename" as now it doesn't take ages to check the whole node_modules folder.

But I haven't found the "Exclude" menu. It is shown for .NET projects (solutions) but not when you open a folder. Please see the screenshot below.

1

Hi Kutynko

got it, thank you. I suppose stopped index should help you in most cases. Could you please describe, when else it works not as you want? Also, you can try to add this folder in `Elements to skip` in File | Settings | Editor | Inspection Settings

 

 

0

Alexandra Guk An old thread I know but I'm also experiencing this problem. I've tried following the steps above and I have the same issue:

  1. There is no "Exclude" option for the node modules folder
  2. There is no option to "Stop Index" in the tools sub menu
  3. I have tried adding the `node_modules` folder in the Elements to skip settings

It's still showing node_modules search results.

2

Hi Pajohns

What Rider version do you use? 

We've made some changes in this part in 2021.2. I'd recommend you to update to the latest available Rider 2021.3.3 and check if the problem is fixed.  If not, please, let me know. 

Have a great day! 

-2

Please sign in to leave a comment.