Added .editorconfig file #698

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
6 participants
@AurelioDeRosa
Member

AurelioDeRosa commented Jan 23, 2016

.editorconfig file taken directly from jQuery's repository.

@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@agcolom

This comment has been minimized.

Show comment
Hide comment
@agcolom

agcolom Feb 24, 2016

Member

@kswedberg Could you please have a look? I'm wondering whether we need an entry for each of package.json and *.yml to be set to two spaces?

Member

agcolom commented Feb 24, 2016

@kswedberg Could you please have a look? I'm wondering whether we need an entry for each of package.json and *.yml to be set to two spaces?

@gnarf

This comment has been minimized.

Show comment
Hide comment
@gnarf

gnarf Feb 24, 2016

Member

If that's the spacing we are using for those files (and that is the spacing that npm uses for package.json) I would agree that we should add those to the .editorconfig

Member

gnarf commented Feb 24, 2016

If that's the spacing we are using for those files (and that is the spacing that npm uses for package.json) I would agree that we should add those to the .editorconfig

@agcolom

This comment has been minimized.

Show comment
Hide comment
@agcolom

agcolom Feb 24, 2016

Member

@gnarf Thank you very much for checking. @AurelioDeRosa would you be able to add this? Thank you so much!

Member

agcolom commented Feb 24, 2016

@gnarf Thank you very much for checking. @AurelioDeRosa would you be able to add this? Thank you so much!

@kswedberg

This comment has been minimized.

Show comment
Hide comment
@kswedberg

kswedberg Feb 24, 2016

Member

So, based on the OP and comments above, I think it might be a bit more "DRY" to do it like this:

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[**.json]
indent_style = space
indent_size = 2

[.*]
indent_style = space
indent_size = 2

Thoughts, @AurelioDeRosa , @scottgonzalez , @gnarf, anyone?

Member

kswedberg commented Feb 24, 2016

So, based on the OP and comments above, I think it might be a bit more "DRY" to do it like this:

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[**.json]
indent_style = space
indent_size = 2

[.*]
indent_style = space
indent_size = 2

Thoughts, @AurelioDeRosa , @scottgonzalez , @gnarf, anyone?

@AurelioDeRosa

This comment has been minimized.

Show comment
Hide comment
@AurelioDeRosa

AurelioDeRosa Feb 24, 2016

Member

I think we can combine the second and third sections and use:

[*.{json,yml}]
indent_style = space
indent_size = 2
Member

AurelioDeRosa commented Feb 24, 2016

I think we can combine the second and third sections and use:

[*.{json,yml}]
indent_style = space
indent_size = 2
@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Feb 24, 2016

Member

I would limit to package.json and *.yml. Other .json files use tabs.

Member

scottgonzalez commented Feb 24, 2016

I would limit to package.json and *.yml. Other .json files use tabs.

@AurelioDeRosa

This comment has been minimized.

Show comment
Hide comment
@AurelioDeRosa

AurelioDeRosa Feb 24, 2016

Member

Something like?

[{package.json,*.yml}]
Member

AurelioDeRosa commented Feb 24, 2016

Something like?

[{package.json,*.yml}]
@gnarf

This comment has been minimized.

Show comment
Hide comment
@gnarf

gnarf Feb 24, 2016

Member

I think it's a lot clearer to just list the stuff twice for that... no reason to like not copy/pasta two lines of indent/size settings...

[package.json]
....

[*.yml]
....

feels a lot easier to understand at a glance than using the not as well known {a,b} glob syntax

Member

gnarf commented Feb 24, 2016

I think it's a lot clearer to just list the stuff twice for that... no reason to like not copy/pasta two lines of indent/size settings...

[package.json]
....

[*.yml]
....

feels a lot easier to understand at a glance than using the not as well known {a,b} glob syntax

@AurelioDeRosa

This comment has been minimized.

Show comment
Hide comment
@AurelioDeRosa

AurelioDeRosa Feb 24, 2016

Member

Fine @gnarf. So I'd say that the final file should be:

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[package.json]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

If everyone is happy, I'll make a final PR and then merge.

Member

AurelioDeRosa commented Feb 24, 2016

Fine @gnarf. So I'd say that the final file should be:

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[package.json]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

If everyone is happy, I'll make a final PR and then merge.

@kswedberg

This comment has been minimized.

Show comment
Hide comment
@kswedberg

kswedberg Feb 25, 2016

Member

LGTM! Thanks for sticking with this, @AurelioDeRosa .

Member

kswedberg commented Feb 25, 2016

LGTM! Thanks for sticking with this, @AurelioDeRosa .

@AurelioDeRosa

This comment has been minimized.

Show comment
Hide comment
@AurelioDeRosa

AurelioDeRosa Feb 25, 2016

Member

File updated. Any further comment @gnarf and @scottgonzalez?

Member

AurelioDeRosa commented Feb 25, 2016

File updated. Any further comment @gnarf and @scottgonzalez?

@gnarf

This comment has been minimized.

Show comment
Hide comment
@gnarf

gnarf Feb 26, 2016

Member

👍

Member

gnarf commented Feb 26, 2016

👍

@AurelioDeRosa AurelioDeRosa deleted the AurelioDeRosa:editorconfig branch Feb 26, 2016

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