task: #3623498 Fix ESLint failures in the GitLab CI pipeline.
The ESLint job reported 475 errors and 80 warnings.
Build artefacts are excluded rather than reformatted. dist/dropup-builder.js
and the five files generated from YAML carry a "do not edit" header, so linting
them reports on a generator's output and any reformatting would be undone by
the next npm run icons / npm run countries. The drift checks still pass,
which confirms none of them were touched. This mirrors the existing decision to
keep dist/* out of CSpell.
Everything else is fixed rather than silenced:
- Prettier formatting, prefer-template, operator-linebreak, object-shorthand, import/first and import/no-duplicates applied across the runtime, the store and the test suite.
- The
'use strict'directives are gone from the runtime IIFEs. Core setsstrict: ["error", "never"]and core's own JS wraps in a bare IIFE, so this follows the surrounding convention rather than overriding the rule. - Relative imports lost their .js extensions to satisfy import/extensions.
- The icon helpers moved above navButton, their first caller, so nothing is used before it is defined.
- The avatar renderer's nested ternary became an if/else chain.
- _fieldError never touched
this, so it is now the module-level fieldError() beside formatError(), where the other pure helpers live. - The pasted-dial handler was lifted out of a fourth level of nesting.
- Anonymous function expressions are named, which also makes runtime stack traces legible.
- The 43 @param tags are written out with types and descriptions in the style the rest of the file already uses.
Two rules are disabled inline, each with the reason: a javascript: URL that a
test asserts is rejected, and the new Function() the test harness uses to
evaluate the IIFE runtime the way a browser does. vite.config.js declares that
its vite import is a devDependency on purpose.
352 JS tests and phpcs pass, and the builder bundle was rebuilt.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01RfMSXP8uEo4Vkf5bVeDaTB
Closes #3623498