Bug 33358 - Do not use editorconfig for vue files
Summary: Do not use editorconfig for vue files
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 12545
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-29 14:55 UTC by Jonathan Druart
Modified: 2023-12-28 20:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 33358: Do not use .editorconfig for vue files (980 bytes, patch)
2023-03-29 14:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33358: Do not use .editorconfig for vue files (867 bytes, patch)
2023-05-04 12:11 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-03-29 14:55:31 UTC
Using vscodium I noticed that the settings set in the editor were not used (for instance to not add semi colons at the end of the lines).

This is because they get ignored when a .editorconfig exists.
Comment 1 Jonathan Druart 2023-03-29 14:57:25 UTC
Created attachment 148929 [details] [review]
Bug 33358: Do not use .editorconfig for vue files

Using vscodium I noticed that the settings set in the editor were not used (for instance to not add semi colons at the end of the lines).

This is because they get ignored when a .editorconfig exists.

I didn't find the syntax "all but vue files", but it would be better
than listing the different extensions.
Comment 2 Jonathan Druart 2023-05-04 10:30:57 UTC
Paul, Pedro, can you help with this one please?
Comment 3 Paul Derscheid 2023-05-04 12:11:08 UTC
Created attachment 150654 [details] [review]
Bug 33358: Do not use .editorconfig for vue files

I looked at the docs for editorconfig and I think I found the right syntax to achieve what we want. Correct me, if I'm wrong.
To test:
1. Try this pattern on every filetype we use.
2. Assert it respects the rules.
3. Sign off.
Comment 4 Jonathan Druart 2023-05-04 12:28:23 UTC
This patch does not work for me, using vscodium.
Comment 5 Jonathan Druart 2023-05-10 08:25:33 UTC
I finally found what caused the original problem (vscodium not taking into account its own config). There is a "Prettier: Use Editor Config" that was set. 

I removed it and now it's working without any changes in Koha.

I think that's the best solution for now, as nobody else seems to have problems. Closing.
Comment 6 Jonathan Druart 2023-05-10 08:26:40 UTC
Another solution would be to have our prettier options defined in a .prettierrc. For ts, vue and js files.
Comment 7 Paul Derscheid 2023-05-10 10:23:08 UTC
I really like the idea of a prettierrc file.
Let's do it.