wecodemore / wpstarter

Easily bootstrap whole site Composer packages for WordPress.
https://wecodemore.github.io/wpstarter/
MIT License
244 stars 34 forks source link

Add .editorconfig #60

Closed GaryJones closed 5 years ago

GaryJones commented 7 years ago

I'm finding that I'm adding the .editorconfig file to each install of WPStarter (next to .env). Any chance of getting this added to the default?

# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# http://make.wordpress.org/core/handbook/coding-standards/

root = true

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

[{.bowerrc,.jscsrc,.jshintrc,*.json,*.yml}]
indent_style = space
indent_size = 2

[*.txt]
end_of_line = crlf

[*.md]
trim_trailing_whitespace = false

The second block could also have an eslint selector too.

tfrommen commented 7 years ago

The JSON-ish files could also be captured via [{.*rc,*.json,*.yml}], which would account for an .eslintrc (or even a .babelrc) file.

No idea if that's better than explicitly enumerating files (that might not even be there at all), though.

GaryJones commented 7 years ago

I'm good with .*rc - nice spot.

gmazzap commented 7 years ago

@GaryJones when you can file a PR to dev and I'll merge. Thanks!

GaryJones commented 7 years ago

What else is needed to wire this template up?

gmazzap commented 7 years ago

@GaryJones those three steps are more than enough for me.

gmazzap commented 5 years ago

I'm reconsidering this for v3.

I don't want people to be forced to a specific style when using WP Starter. With v3 there's the possibility to add (reusable) custom steps, and I see creation of .editorconfig to be a good candidate for that.

Because this is not going to happen for v2, I think I can close this.

Thanks to anyone involved, I hope now work has been made already for this. Here I see no commits.