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

[OTHER] Alphabetically order devicon.json #1337

Closed
1 task done
Snailedlt opened this issue Aug 6, 2022 · 7 comments
Closed
1 task done

[OTHER] Alphabetically order devicon.json #1337

Snailedlt opened this issue Aug 6, 2022 · 7 comments
Assignees
Labels
devops Use this label for devops related enhancements in-develop The fix/feature is present in `develop` branch but not merged into `master` yet

Comments

@Snailedlt
Copy link
Collaborator

I have searched through the issues and didn't find my problem.

  • Confirm

What would you like to share?

Due to some recent merges, the devicon.json file has become unprdered. This should be fixed as soon as possible, and at the very least before the next release.

Additional information

Alphabetically ordering the file wilø make it easier to find icons, as well as making it less likely to cause conflicts with future updates to it.

@Snailedlt Snailedlt added the awaiting triage Awaiting triage from a maintainer label Aug 6, 2022
@kilianpaquier
Copy link
Contributor

kilianpaquier commented Aug 6, 2022

We could make a PR after merging the current PRs.

There're a bunch online tools to reorder JSON's + format document (spaces, lines, etc.)

@Snailedlt
Copy link
Collaborator Author

Yeah. I think the best thing would be to use a linter like prettier or eslint to automatically sort it alphabetically when a new PR is created or something. But that might be a bit of work to implement unless someone here has done it before :)

@Panquesito7 Panquesito7 added devops Use this label for devops related enhancements and removed awaiting triage Awaiting triage from a maintainer labels Aug 7, 2022
@BenSouchet
Copy link
Contributor

In my opinion the easiest way for now would be to create a PR to lint the file, and check if users place correctly the new entry, and finally add an .editorconfig at root of the project.

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.

See https://editorconfig.org/ , I used it in multiple projects and it's compatible with all majors IDEs.
EditorConfig won't re-order the file alphabetically, but can ensure basic elements, like indentations, charset, final new line, end of line, etc...

The advantage of EditorConfig is that it's very simple to add to a project and you have nothing to do after that, no installation, no maintenance, etc...

For Devicon, we can only configure the JSON and SVG extensions, something like:

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[*.json]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.svg]
trim_trailing_whitespace = false

The idea to add a new action step to the merge process is still a valid good addition but since it can be a bit more complexe to setup maybe we can start with manual check and EditorConfig for formatting.

@Snailedlt
Copy link
Collaborator Author

@BenSouchet sounds like a good start. Do you want to add it?

@BenSouchet
Copy link
Contributor

@Snailedlt I just created this PR #1344 😊

@BenSouchet
Copy link
Contributor

In the PR I mention in my prev comment, I talk about spectral, a JSON linter that can be useful, and can maybe be linked in this project when a PR is merge in develop, or as an hook when maintainers add specific tag to a PR

@Snailedlt
Copy link
Collaborator Author

Nice! I'll take a look soon (hopefully). Added Panquesito as a reviewer too

@Snailedlt Snailedlt self-assigned this Oct 15, 2022
@Snailedlt Snailedlt added the in-develop The fix/feature is present in `develop` branch but not merged into `master` yet label Dec 11, 2022
@github-actions github-actions bot closed this as completed Feb 2, 2023
This issue was closed.
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 in-develop The fix/feature is present in `develop` branch but not merged into `master` yet
Projects
None yet
Development

No branches or pull requests

4 participants