ReSharper Web Help

Code Cleanup is available in JavaScript as well. Thus you are not supposed to organise your code manually, ReSharper will do that for you!

You can apply Code Cleanup to a selected block of code, to the opened file or to a number of files. To learn how to apply Code Cleanup to a desired scope, see Running Code Cleanup.

Code Cleanup provides two default profiles - Full Cleanup and Reformat Code - you can use one of them or create a custom profile.

Full Cleanup vs Reformat Code

Action Full Cleanup Reformat Code

Terminate statements

feature_available

feature_not_available

Reformat Code

feature_available

feature_available

ReSharper reformats code according to settings configured in:

  • ReSharper | Options | Code Editing | JavaScript | Formatting Style | Braces Layout
  • ReSharper | Options | Code Editing | JavaScript | Formatting Style | Line Breaks
  • ReSharper | Options | Code Editing | JavaScript | Formatting Style | Spaces
  • ReSharper | Options | Code Editing | JavaScript | Formatting Style | Other

Consider the example below. Before Code Cleanup:
ReSharper_by_Language__JavaScript__Code_Cleanup_01
After:
ReSharper_by_Language__JavaScript__Code_Cleanup_02