knightcrawler-stremio / knightcrawler

A selfhosted Stremio addon
Apache License 2.0
265 stars 38 forks source link

Contributing guidelines. #36

Open Gabisonfire opened 8 months ago

Gabisonfire commented 8 months ago

With people contributing, everyones going to format the code slightly differently. I think adding something as simple as a .editorconfig file to the repo could make things a little more consistent.

There's also the option of adding some git hooks, but this would be a little more complicated.

An example .editorconfig could be something like:

EditorConfig is awesome: https://EditorConfig.org

top-most EditorConfig file

root = true

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

Batch Files

[*.{cmd,bat}] end_of_line = crlf

JSON Files

[*.{json,json5,webmanifest}] indent_size = 2

YAML Files

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

or we could set up something like pre-commit hook, but this will add some more dependencies to the project. Maybe a github workflow?

iPromKnight commented 8 months ago

see #26 I included what I usually use for projects - it covers a lot of c# really, but will work for everything We will probably want to customize a little as its tailored to my tastes lol