Home > Mobile >  When adding getters, IDEA adds an underscore to variable names
When adding getters, IDEA adds an underscore to variable names

Time:01-27

In an Angular project, when adding getters, IDEA adds an underscore to variable names.

Is it possible to configure the IDE so that it does the opposite - adds this symbol to getters, but does not change the names of variables?

CodePudding user response:

IDE create names in accordance to JavaScript/TypeScript naming conventions. You can configure it in

  • Settings (Preferences on macOS) | Editor | Code Style | JavaScript | Code Generation | Naming Conventions | Field prefix:
  • Settings (Preferences on macOS) | Editor | Code Style | TypeScript | Code Generation | Naming Conventions | Field prefix:
  •  Tags:  
  • Related