Adjust prettier configuration to respect config files if they already exist
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3358301. --> Reported by: [hestenet](https://www.drupal.org/user/54034) Related to !15 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>This is a follow-up from <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-6"><a href="https://www.drupal.org/project/gitlab_templates/issues/3357971" title="Status: Closed (works as designed)">#3357971: ESLINT needs the eslint-plugin-prettier plugin</a></span> and the comments on <a href="https://git.drupalcode.org/project/gitlab_templates/-/merge_requests/14#note_171895">gitlab_templates/-/merge_requests/14</a></p> <blockquote><p>@jonathan1055<br> These link statements need to check if the file already exists. Contrib can have either of these files, and if they exist (a) the existing file should be left intact, and (b) the ln command fails anyway.</p> <p>@jonathan1055<br> I fixed this in my override version using</p> <pre>&nbsp;&nbsp;&nbsp; - if [[ ! -f .prettierrc.json ]] ; then ln -s $_WEB_ROOT/core/.prettierrc.json . ; fi<br>&nbsp;&nbsp;&nbsp; - if [[ ! -f .prettierignore ]]; then ln -s $_WEB_ROOT/core/.prettierignore .; fi</pre></blockquote> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>TBD</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>TBD</p>
issue