Skip to content

Conversation

smorimoto
Copy link
Member

No description provided.

@smorimoto
Copy link
Member Author

At least, as far as the Makefile is really concerned, we probably moved to the JS based system to get rid of it. So! We can and/or should remove it! The editorconfig is arguable, but it's not necessary at this very moment because it's easy to mess things up in relationship to Prettier and others. We can re-visit if we really need it.

@ljharb
Copy link
Member

ljharb commented Apr 4, 2022

why delete editorconfig instead of fixing the name to .editorconfig?

Copy link
Collaborator

@codehag codehag left a comment

Choose a reason for hiding this comment

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

iiuc we no longer use docker, so this is fine.

@codehag
Copy link
Collaborator

codehag commented Apr 4, 2022

why delete editorconfig instead of fixing the name to .editorconfig?

I don't think anyone is using it. I am not, but we can keep it if necessary.

@smorimoto
Copy link
Member Author

For example, if you change the eol or space settings in the Prettier configuration, which one takes precedence, editorconfig or Prettier? We don't always need more than we need unless we really need it.

@ljharb
Copy link
Member

ljharb commented Apr 4, 2022

editors, and github.com itself, read editorconfig, and don't generally read prettier settings.

I agree they should be kept in sync, but it's better to have two files not in sync, than to lack the universally recognized editorconfig.

@smorimoto
Copy link
Member Author

The editorconfig extension in some editors overwrites editor behaviour, and if it behaves differently to Prettier's configuration, things are quite tricky, and while I don't think there are many situations in this project that need editorconfig. So I don't think it will benefit from having that extra layer of complexity.

Copy link
Contributor

@DerekNonGeneric DerekNonGeneric left a comment

Choose a reason for hiding this comment

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

The preferences specified in the .editorConfig file never seem to be applied due to the file name being wrong, but even with that corrected, it would not be enforced by any tooling (at the moment). Seems fine to let it go for now until that gets implemented. I have been using editorconfig-checker for enforcement in my other projects, but that can probably come later if desired (it seems so).

The Makefile, on the other hand, appears to have become obsoleted with migration to Eleventy.

@smorimoto smorimoto merged commit cb1348a into master Apr 16, 2022
@smorimoto smorimoto deleted the cleanup branch April 16, 2022 04:45
@DerekNonGeneric
Copy link
Contributor

I would like to circle back to this real quick just to make sure we have the proper resolution.

Regarding how Prettier interacts with options specified in .editorconfig files, the following is according to their official docs.

If options.editorconfig is true and an .editorconfig file is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by .prettierrc, etc.

https://prettier.io/docs/en/configuration.html#editorconfig

So, evidently, Prettier does respect the options specified in .editorconfig files if properly configured, so I think it would be a good idea if we were to re-add it and do that here. Additionally, it would be ideal if we had the proper tooling set up to be sure that those options were enforced by CI independent of Prettier. The reason is that Prettier is only active on a limited subset of file formats while EditorConfig is able to handle all text files. I linked to that bit of tooling in my previous post.

What do you all think? If there are no objections, I might go for it if that's alright.

@smorimoto
Copy link
Member Author

I totally missed it! I would love to take a care of it when it gets open.

@DerekNonGeneric
Copy link
Contributor

I totally missed it! I would love to take a care of it when it gets open.

@smorimoto, I got it started over at #293 — seems other open PR is currently handling re-adding of the .editorconfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants