Code Guide

Editor Preferences

Set your editor to the following settings to avoid common code inconsistencies and maintain cleaner diffs:

  • Use soft-tabs set to two spaces.
  • Trim trailing white space on save.
  • Set encoding to UTF-8.
  • Add new line at end of files.

Consider documenting and applying these preferences to your project's .editorconfig file. As an example, here is the one we're using in this Design System:

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

Learn more about EditorConfig.