editorconfig

Public
Creates editorconfig configuration file
Icons/chart bar
Used 24 times
Created by
d dpaluy

Usage
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.  https://editorconfig.org/

Visual Studio Code plugin: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/XnJsB4"
Template Source

Review the code before running this template on your machine.

run "touch .editorconfig"

inject_into_file ".editorconfig" do <<~EOF
# editorconfig.org
root = true

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

# Keep whitespace for markdown
[*.md]
trim_trailing_whitespace = false

# Leave vendor assets as is
[vendor/**]
indent_style = ignore
indent_size = ignore
insert_final_newline = ignore
  EOF
end
Comments

Sign up or Login to leave a comment.