Summary: | prettierrc should set tabWidth and useTabs | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to main --- | QA Contact: | Victor Grousset/tuxayo <victor> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, paul.derscheid, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes Koha's Prettier code formatter configuration file (.prettierrc.js) to set the default indentation to four spaces.
|
|
Version(s) released in: |
25.05.00
|
Circulation function: | |
Attachments: |
Bug 38546: Set tabWidth and useTabs in prettierrc
Bug 38546: Set tabWidth and useTabs in prettierrc Bug 38546: Set tabWidth and useTabs in prettierrc |
Description
Jonathan Druart
2024-11-28 14:51:45 UTC
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! |