Establish a clean lint baseline for Drupal 10 and Drupal 11 on 2.x
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3623437. -->
Reported by: [ivrh](https://www.drupal.org/user/149520)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The GitLab CI configuration introduced by <a href="https://www.drupal.org/project/entity_activity/issues/3623285">#3623285</a> exposes substantial pre-existing validation debt in Entity Activity.</p>
<p>The latest merge request pipeline reports:</p>
<ul>
<li>CSpell: 34 findings in 19 files, representing 15 distinct words.</li>
<li>ESLint/Prettier: 327 initial errors, with 53 remaining after automatic fixes.</li>
<li>PHPCS: 104 violations in 25 sources; 55 are automatically fixable.</li>
<li>PHPStan on Drupal 10: 6 errors, including deprecated API usage, static service-container calls, and a missing return value.</li>
<li>Stylelint/Prettier: 31 errors; 18 are automatically fixable.</li>
</ul>
<p>The validation jobs are currently allowed to fail, so the pipeline completes with warnings even though these checks are not clean.</p>
<p>This cleanup should not be mixed into <a href="https://www.drupal.org/project/entity_activity/issues/3287201">#3287201</a>, which provides Drupal 10 compatibility, or #3623285, which introduces GitLab CI and migrates the existing tests. Keeping the work separate will make those merge requests easier to review and will give the future 2.x branch a clear lint baseline.</p>
<h3 id="summary-dependencies">Dependencies</h3>
<p>This issue is a child of <a href="https://www.drupal.org/project/entity_activity/issues/3623286">#3623286</a>.</p>
<p>It depends on:</p>
<ul>
<li>#3287201 being committed, providing the Drupal 10-compatible codebase;</li>
<li>#3623285 being rebased and committed, providing the GitLab CI configuration and passing Drupal 10 PHPUnit tests;</li>
<li>the 2.x branch being created from that completed revision;</li>
<li>the separate Drupal 11 compatibility issue required by #3623286 being completed or coordinated with this work.</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Create an issue branch from 2.x and:</p>
<ol>
<li>Configure the official Drupal GitLab templates to test the current Drupal major and the previous major. With Drupal 11 current, these are Drupal 11 and Drupal 10 respectively.</li>
<li>Apply the generated ESLint, PHPCBF, and Stylelint automatic fixes, reviewing every resulting change.</li>
<li>Fix the remaining JavaScript, YAML, PHP, CSS, and PHPStan findings manually.</li>
<li>Correct genuine spelling mistakes and add only legitimate project names or technical terms to a project CSpell dictionary.</li>
<li>Replace deprecated APIs and static service-container calls through the Drupal 11 compatibility work rather than suppressing those findings.</li>
<li>Add project-specific lint configuration only where an exception is intentional and documented. Do not hide fixable violations with broad ignore rules or a blanket PHPStan baseline.</li>
<li>Once the jobs are green, make validation failures blocking so future regressions fail the pipeline.</li>
</ol>
<p>Mechanical formatting changes should be kept separate from semantic API changes where practical, making the merge request easier to review.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ol>
<li>[x] The work targets a 2.x issue branch created from the post-#3287201 and post-#3623285 baseline.</li>
<li>[x] Composer installation passes for Drupal 11 current and Drupal 10 previous major.</li>
<li>[x] PHPUnit passes on Drupal 11 current and Drupal 10 previous major.</li>
<li>[x] CSpell, ESLint, PHPCS, and Stylelint complete without violations.</li>
<li>[x] PHPStan passes on both Drupal 11 current and Drupal 10 previous major.</li>
<li>[x] No lint job is skipped and no broad baseline hides unresolved violations.</li>
<li>[x] Any intentional dictionary entries, exclusions, or rule overrides are minimal and documented.</li>
<li>[x] Validation failures are made blocking after the baseline is clean.</li>
<li>[x] The successful GitLab pipeline is linked from this issue before it is moved to Needs review.</li>
</ol>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None expected.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None expected from mechanical lint fixes. Any changes required for Drupal 11 compatibility must be documented in the separate Drupal 11 implementation issue.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None expected.</p>
issue
GitLab AI Context
Project: project/entity_activity
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/entity_activity/-/raw/2.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/entity_activity
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD