Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .editorconfig #44

Open
Cadair opened this issue Feb 16, 2024 · 8 comments
Open

Add .editorconfig #44

Cadair opened this issue Feb 16, 2024 · 8 comments
Labels
Feature Request New feature or request
Milestone

Comments

@Cadair
Copy link
Member

Cadair commented Feb 16, 2024

Describe the feature

https://github.com/sunpy/sunpy/blob/main/.editorconfig

@wtbarnes DEBATE!

Proposed solution

No response

@Cadair Cadair added the Feature Request New feature or request label Feb 16, 2024
@Cadair Cadair added this to the v1.0 milestone Feb 16, 2024
@nabobalis
Copy link
Contributor

Debate what?

@Cadair
Copy link
Member Author

Cadair commented Feb 16, 2024

The existence of the file.

@nabobalis
Copy link
Contributor

Why?

@wtbarnes
Copy link
Member

Ha I mean if people find it useful and it's relatively easy to maintain, I won't raise a stink about it. I haven't personally found it useful in any of the editors I've used but 🤷‍♂️.

If a package that used the template wanted to remove this file and not use it, would that create conflicts later on when keeping up to date with the upstream template, ie would an automatically-triggered PR try to add it back?

@nabobalis
Copy link
Contributor

I forgot why it's useful.

@wtbarnes
Copy link
Member

Yeah that's what I meant by "if people find it useful." If we don't have examples of that, I don't see a need to keep it.

@nabobalis
Copy link
Contributor

I think I have a plugin for vs code to use it if it exists but all the projects I work on are python, so it's kind of useless

@nabobalis
Copy link
Contributor

nabobalis commented Feb 27, 2024

Python linting tools help us ensure we don't need this for Python however for other file types, since we do not lint them at at all, an editor config helps us here:

Their example has the following:

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

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Indentation override for all JS under lib directory
[lib/**.js]
indent_style = space
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
Development

No branches or pull requests

3 participants