We don't even have the default indentation set to 4 spaces.
Created attachment 175017 [details] [review] Bug 38546: Set tabWidth and useTabs in prettierrc
Test plan: For vi, visual mode, select a block a JS code (in .js or template) and run `!prettier --parser typescript` With this patch applied the 4-spaces indentation is preserved.
Created attachment 175935 [details] [review] Bug 38546: Set tabWidth and useTabs in prettierrc Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. I tested using this file to test the change: koha-tmpl/intranet-tmpl/js/i18n.js 2. To get into visual mode to select text with the down arrow key, press v 3. The block of text I selected was correctly reformatted to use four spaces for indentation (I selected a block a JS code and ran `!prettier --parser typescript`)
Created attachment 176097 [details] [review] Bug 38546: Set tabWidth and useTabs in prettierrc Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Works (on js, ts and vue files), makes sense, QA script happy, code looks good, passing QA :) Prettier --write was already honoring 4 space indentation. Somehow it was running from vi/vim that didn't.
Pushed for 25.05! Well done everyone, thank you!