dot-editorconfig

creates a .editorconfig file in your package dir

Usage | Source | Contributing | License

KLP

Usage

EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.

Launch the command

npm install dot-editorconfig --no-save

If you prefer to add dot-editorconfig package as a dev dependency, you can launch

npm install dot-editorconfig --save-dev

A .editorconfig will be created in your package dir. See its content here.

Notice that installing dot-editorconfig will not override your .editorconfig file, if it already exists. If you need to upgrade it is necessary to remove it manually before, for instance

rm .editorconfig

It is up to you to choose to add it to .gitignore or to version it and modify it further.

Source

If you don’t have npm you can just copy and paste the following source.

# EditorConfig is awesome: http://EditorConfig.org

# Stop the editor from looking for .editorconfig files in the parent directories.
root = true

[*]
# Non-configurable Prettier behaviors
charset = utf-8
insert_final_newline = true

# Configurable Prettier behaviors
# (change these if your Prettier config differs)
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80

trim_trailing_whitespace = true

[*{.conf,.pl,.pm,.py,.sol}]
indent_size = 4

[*{.glsl,.go,.sh,.sql}]
indent_style = tab

[Makefile]
indent_style = tab

Contributing

If you also like the idea to have an easy way to install and share an .editorconfig file, and you think you can contribute adding something missing or improving current configuration, edit this README in the Source section and send a pull request.

Do not edit this .editorconfig file, since it is generated by commands

npm install markdown2code --no-save
npm run markdown2code

License

MIT