| 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: | RESOLVED FIXED | QA Contact: | Victor Grousset/tuxayo <victor> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | baptiste.wojtkowski, david, paul.derscheid, victor |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | 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,24.11.08
|
| 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! Pushed into 24.11.x for 24.11.08 nice work everyone Not backporting to 22.11.x as it wasn't backported to 24.05.x Architecture related/bug fix, no updates to the manual required. |