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 file and cleanup devicon.json bad formatting #1364

Merged
merged 1 commit into from
Sep 6, 2022
Merged

Add editorconfig file and cleanup devicon.json bad formatting #1364

merged 1 commit into from
Sep 6, 2022

Conversation

BenSouchet
Copy link
Contributor

New Version of PR #1344 (recreated since rebase created too much conflicts)

Intro

This PR is based on this discussion #1337 , the idea was, as a first step, to add EditorConfig to the project, and I also fix bad formatting on the JSON file.

What is EditorConfig ?

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

What is done by EditorConfig

When you work on a file, and for example press the tab key , you will automatically insert the correct indent type and length, for Devicon it's space of length 4.
When you save the file, the charset defined will be used, whitespace at end of lines (if enable) will be removed. An empty new line will be created at the end of the file if not already present.

What isn't done

EditorConfig is not a linter, so the file won't be re-ordered, existing tab keys won't be replaced by spaces, or miss-aligned indentation won't be fixed.

EditorConfig is a list of parameters what will be read and used by your current IDE to format the text you are adding, and format the ouput file settings (charset, insert_final_newline).

Conclusion

EditorConfig is one step in the right direction to unified project files formatting

This does not replace a linter, for JSON file spectral could be a good choice.
Github Hook can be added to lint the JSON file:
https://meta.stoplight.io/docs/spectral/ecaa0fd8a950d-workflows#git-hooks

Since the "cleaning" of devicon.json file can lead to merge conflicts It's maybe a good idea to handle the open pull requests first, then when there is few pull requests still open, this PR can be merge to develop.

@Snailedlt Snailedlt requested review from a team, Snailedlt and Panquesito7 and removed request for a team August 29, 2022 14:34
@Panquesito7 Panquesito7 added the devops Use this label for devops related enhancements label Aug 29, 2022
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! Thank you. 🚀

__
sema-logo  Summary: 🏆 This code is awesome  |  Tags: Maintainable

@BenSouchet
Copy link
Contributor Author

@Snailedlt did you get time to check?
Because new PR as been open, if we want to merge it we need to do it before a lot of new PR are created.

@Panquesito7
Copy link
Member

I'll be merging this PR soon.
In case there was anything wrong, we can either revert the changes or make another PR to fix those. 🙂

Thank you for your patience.

@Panquesito7 Panquesito7 merged commit fc55a10 into devicons:develop Sep 6, 2022
@Snailedlt
Copy link
Collaborator

Sorry I didn't get to check it.
Been busy lately and just got sick with a fever this weekend when I was supposed to check it out :/

@BenSouchet
Copy link
Contributor Author

@Snailedlt
No worries, health is the most important thing and it is totally understandable that we are not always available.
Like Panquesito7 said if we see a missing modification or a typo we can always revert or fit it via a new PR.
I hope your health will improve, have a good day 🙂

@Snailedlt Snailedlt mentioned this pull request Oct 15, 2022
1 task
Snailedlt pushed a commit to Snailedlt/devicon that referenced this pull request Oct 15, 2022
Snailedlt pushed a commit to Snailedlt/devicon that referenced this pull request Oct 15, 2022
Snailedlt pushed a commit to Snailedlt/devicon that referenced this pull request Oct 15, 2022
@Snailedlt Snailedlt mentioned this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Use this label for devops related enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants