fix(lint): clear the last tranche-A suppression — require.context under a file-wide no-undef - #217
Merged
Merged
Conversation
The shared quality.yml moved to Node 24 (ConductionNL/.github#469) because npm 10 cannot install from an npm 11 lockfile — EUSAGE, 'Missing: <pkg> from lock file'. This repo's OWN workflows did not move with it and they run npm ci too: measured on the cooldown PR, every shared-workflow job passed while Lint Check and Spec Validation went red on exactly that error. pull-request-lint-check.yaml had no setup-node AT ALL, so it silently inherited the runner default. That is the harder half to notice — nothing in the file named a Node version, so nothing looked wrong. Left alone deliberately: l10n.yml (its only 'npm ci' is in a comment saying it needs none) and api-test-coverage.yml (npm install -g newman, no lockfile).
…er a file-wide no-undef `require.context()` is a WEBPACK build-time API the bundler rewrites at compile time, so eslint is right that no runtime `require` exists and the code is right too. The file-wide `no-undef` suppression that recorded this also switched the rule off for every OTHER identifier in the file, so a genuine typo there would have been silent. Scoped to `/* global require */`. Same shape found in 9 apps across the fleet; all cleared the same way. Verified: eslint 0 errors, build exit 0, tests pass.
Contributor
Quality Report — ConductionNL/openbuild @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| check-gitignore | ✅ | ||||
| check-nc-floor | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 106/106 | |||
| npm | ✅ | ✅ 626/626 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-16 05:49 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clears this repo's last tranche-A eslint suppression — the set where a suppression can hide a real defect.
require.context()sat under a file-wideno-undefsuppression. That is a webpack build-time API the bundler rewrites at compile time, so eslint is right that no runtimerequireexists — and the code is right too.The problem was scope: a file-wide suppression also switches
no-undefoff for every other identifier in the file, so a genuine typo there would have been silent. Now/* global require */on the one line.This is the same shape found in 9 apps across the fleet; all are being cleared the same way.
Verification
npm ci→eslint src(0 errors) →npm run build(exit 0) → tests pass. Suppressions drop by 1 and are pruned.