Setting up IntelliJ - guardian/support-frontend GitHub Wiki

Set project root for clientside assets

  • Right click on assets dir in left-hand directory view and click Mark directory as, Sources root
  • You'll need to do this each time you start IntelliJ. If anyone finds a way to make IntelliJ remember this, update this wiki!!

Imports

These will let auto-import work properly in keeping with the project style

  • Preferences > Editor > Code Style > Javascript, Imports tab. Tick Use paths relative to the project. This will get it to use absolute paths for JS imports rather than relative which is consistent with the style of the project
  • Preferences > Editor > Code Style > Javascript, Spaces tab. Tick ES6 import/export braces under Within

Quotes

  • Preferences > Editor > Code Style > Javascript, Punctuation tab choose single quotes always