Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce .editorconfig file #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 54 additions & 0 deletions elao.app/.editorconfig.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# top-most EditorConfig file
root = true

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

################
# Common files #
################

[Makefile]
indent_style = tab

[*.php]
indent_size = 4
max_line_length = 120

[*.{css,sass,scss}]
indent_size = 2
max_line_length = 120

[*.{js,vue}]
indent_size = 2
max_line_length = 120

[*.{html,xml}]
indent_size = 4

[*.json]
indent_size = 4

[*.md]
trim_trailing_whitespace = false # keep end of line double-space for markdown EOL
max_line_length = 120 # wrap after X chars

[*.{yaml,yml}]
indent_size = 2

###########
# Symfony #
###########

[*.twig]
Copy link
Member

@ogizanagi ogizanagi Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[*.twig]
[*.html.twig]

?

Sometimes we might generate something else than HTML, and I think the generated format indent matters more than Twig indent. We use 4 for twig in most cases because we use 4 for HTML, right?

indent_size = 4

[config/*.{yaml,yml,xml}]
indent_size = 4

[translations/*.{yaml,yml,xml}]
indent_size = 4