Add an editorconfig file #7

Closed
florianbouvot opened this Issue Jun 26, 2016 · 11 comments

Projects

None yet

5 participants

@florianbouvot
Member

We could add an .editorconfig file to work together and maintain consistent coding styles.

e.g.:

root = true

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

What do you think?

@anselmh
Member
anselmh commented Jun 27, 2016

Totally yes for an .editorconfig file but for CSS the common standard would be tabs or 4-spaces, not 2 so I’d rather stick to 4 spaces. Also, we should consider allowing trailing whitespace for .md files to create a <br> in Markdown/README.

@florianbouvot
Member
florianbouvot commented Jun 27, 2016 edited

I have switch some month ago from 4-spaces to 2 spaces for CSS like many project on Github, but what do others think about it?

root = true

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

[*.md]
trim_trailing_whitespace = false

or

root = true

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

[*.md]
trim_trailing_whitespace = false
@nenadjelovac
Member

I guess this is what @csswizardry has to say about it :)

I'm personally still on 4 spaces, but would go with 2 if the team decides so ;)

@csshugs
Member
csshugs commented Jun 27, 2016

Vote for 4 spaces here...

@csshugs
Member
csshugs commented Jun 27, 2016

...and for 2 spaces here.

@nenadjelovac
Member

Maybe we should hear what Harry has to say about cons of two spaces before we decide/vote? @csswizardry please let us know ;)

@csswizardry
Member

Trust me, once you swap to 2 spaces, 4 spaces will feel like you’re coding with boxing gloves on 😂

@florianbouvot
Member

Ok I create a PR.

@csswizardry
Member

👍

@florianbouvot florianbouvot pushed a commit that referenced this issue Jun 28, 2016
Florian Bouvot [refs #7] Add editorconfig file cf6e048
@florianbouvot
Member

Close : merge with 2 spaces 😏.

@csswizardry
Member

(There isn’t a 😈 reaction.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment