0

Latest version of Rider does not clean up JS files (C# file cleanup working fine), such as removing extra spaces, extra lines, or fixing lines greater than defined acceptable length. However, Resharper cleans up the files correctly. NET Core 3.0 web project. All JS files located in the wwwroot/js directory. Has anyone experienced this? If yes, how did you fix it.

To be explicit: cleanup using Ctrl+E, C

Tried:

  • Restarting IDE
  • Invalidating cache
  • Moving files to different folder
JJJulien
  • 269
  • 2
  • 13
  • 1
    wwwroot is content folder, not a temporary output folder. Or what exactly do you mean with "cleanup"? Removing build artifacts? – Tseng Oct 29 '19 at 15:52
  • @Tseng Yes, it's a content folder--for JS files among other things. Not sure what you are saying. Code cleanup, as mentioned above, initiated in Resharper or Rider via Ctrl + E, C. For fun, I moved the JS files to another folder outside wwwroot with same result, no cleanup. – JJJulien Oct 31 '19 at 20:40

1 Answers1

0

Started from 2019.1 Rider supports JavaScript/TypeScript languages using WebStorm Engine. Earlier, ReSharper was responsible for this part. Clean Up function is a ReSharper action. This fact explains why js/ts files are not affected by it. One needs to configure separate settings for JS and TS code style:

Preferences | Editor | Code Style | JavaScript

Preferences | Editor | Code Style | TypeScript

And then, to apply code format on ts/js files, one need to call the "Reformat Code" action.

sbyzova
  • 146
  • 1
  • 7