EditorConfig
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
Used 58 times
J
Jason Miller
Usage
See EditorConfig.org for further configuration options.
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/V4Yslo"
Template Source
Review the code before running this template on your machine.
if File.exists? ".editorconfig"
puts ".editorconfig already exists, aborting editorconfig setup"
return
end
create_file '.editorconfig' do <<~EOF
# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
[*.{js,rb,erb,html}]
charset = utf-8
EOF
end