In order to configure the GitHub editor, simply create the file
.editorconfig in your repository.
This file makes use of the INI file format and as such may be configured like so:
[*.js] indent_style = space indent_size = 2
For more information on how to configure the file for the GitHub editor, please refer to the EditorConfig wiki.