Im-Beast / deno_tui

🦕 Deno module for creating Terminal User Interfaces
https://deno.land/x/tui
MIT License
266 stars 18 forks source link

Editorconfig #18

Closed ElectronicsArchiver closed 1 year ago

ElectronicsArchiver commented 1 year ago

Have you considered adding an Editorconfig file to the repository?

I would recommend the following settings:


root = true

[*]
insert_final_newline = true
end_of_line = lf

[*.{md,ts,jsonc}]
indent_style = space
indent_size = 4
charset = utf-8
Im-Beast commented 1 year ago

deno_fmt is used for formatting the code.

ElectronicsArchiver commented 1 year ago

deno_fmt is used for formatting the code.

I'm not talking about post formatting though, editorconfig gives most editors simple hints to follow, so it doesn't insert tabs instead of spaces ( for example ) to begin with or keeps the correct amount for each key press.

Im-Beast commented 1 year ago

it's called formatting.

ElectronicsArchiver commented 1 year ago

Calling denos formatting command is Post-formatting, while an editorconfig file is Pre-formatting in this context.

One adjusts the content after the fact, the other prevents things from happening in the first place.

Both are valid and can be used together.