User:BSitzmann (WMF)/IntelliJ Settings
Appearance
Here I'd like to document some of my IntelliJ settings I used for developing JavaScript/Node.js, esp. for the RESTBase based Mobile Content Service. I run this on a Mac but it should be easy to translate the settings for other Operating Systems.
To open the settings press Cmd
and ,
.
Editor / Code Style
[edit]Set Right margin (columns)
to 100.
JavaScript
[edit]- Tabs and Indents: uncheck
Indent chained methods
- Wrapping and Braces:
- Binary expressions:
Wrap if long
and checkOperation sign on next line
- Assignment statement:
Wrap if long
and checkAssignment sign on next line
- Binary expressions:
Version Control
[edit]- Check
Commit message right margin (columns)
and leave the value after that at 72. This will also change the font for the commit message to one in the monospace font-family. - I suggest to also check the next checkbox
Wrap when typing reaches right margin
.
Debug configuration for MCS and other Node services using Service runner
[edit]- When creating a Run/Debug configuration for starting a Node.js projects based on our Services' team's node template use the Node.js setting and change the entry for
JavaScript
file fromapp.js
toserver.js
. Server.js starts Service runner. - The other requirement for this to work is that in the active config.yaml file
num_workers
is set to0
, so that everything runs in the same process. This is usually the default for theconfig.dev.yaml
for projects using the template. One exception is the RESTBase code itself. But you can simply add a line to the beginning of theconfig.yaml
file like:
num_workers: 0