Update dependency @cloudfour/eslint-config to v28 - #2499
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
✅ Deploy Preview for cloudfour-patterns ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
renovate
Bot
force-pushed
the
renovate/major-eslint
branch
6 times, most recently
from
September 20, 2026 22:55
1161128 to
14333e2
Compare
renovate
Bot
force-pushed
the
renovate/major-eslint
branch
from
September 21, 2026 00:54
14333e2 to
b4117e5
Compare
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.
This PR contains the following updates:
26.1.0→28.0.0Release Notes
cloudfour/eslint-config (@cloudfour/eslint-config)
v28.0.0Compare Source
Major Changes
@typescript-eslint/no-floating-promisesand@typescript-eslint/restrict-template-expressionsare now on. Both had beenoff since 2020, when our TypeScript rules were first added.
eslint-config-xoenables both, so this change deletes our two overrides rather than configuring
anything: the rules arrive with xo's options, not the plugin defaults.
Measured across 296 TypeScript files in three consumers —
c4-sw-ac-patterns(221),
linkedin-talent-connect(66) andlighthouse-parade(9) — this isnine
no-floating-promisesreports and tworestrict-template-expressions. Neither rule is auto-fixable, thoughno-floating-promisesoffers editor suggestions, so anything either onecatches has to be edited by hand. That is what makes this a major release.
no-floating-promisesreports a promise that is started and then abandoned —no
await, no.catch(), novoid. It runs with xo'signoreVoid, sovoid doThing()marks one as deliberately unawaited, and xo relaxesno-voidto permit that form. The old reasoning for turning it off — that humans should
decide when to handle a rejection — is what
voidexpresses; the difference isthat the decision is now visible at the call site instead of indistinguishable
from an oversight. Six of the nine reports in the sample were un-awaited
waitFor()calls in test files, where the assertion inside could not fail thetest.
restrict-template-expressionsruns with xo'sallowNumber: trueand leavesallowAnyat its default, so interpolating ananyinto a template literal isstill allowed — the specific allowance our override was written for survives
the rule being on. What it reports is values with no useful string form. Both
reports in the sample were
never, from setters whose type guard narrows theguard's own failure branch.
The
@typescript-eslint/no-unsafe-*family stays off, and so doesno-unsafe-type-assertion, which is a much larger migration (377 reports inthe same sample) and a separate question.
func-namesis now on, at xo's setting ofnever. It reports a namedfunction expression —
const handler = function onClick() {}— and wantsthe name dropped, because since ES6 the variable name is inferred anyway. It
has nothing to say about function declarations.
We had turned it off in the original 2018 config with no reason recorded
anywhere, so this adopts xo's position rather than reversing a decision of
ours. Zero reports across 434 files in three consumers — modern code reaches
for arrow functions, which the rule does not touch.
The case it does cost you is naming a callback purely for debugging, such as
setTimeout(function tick() {}, 100). Inference does not apply to a functionpassed straight as an argument, so that name is the only thing that shows up
in a stack trace or profiler. If you want it,
// eslint-disable-next-line func-nameson that call is the escape hatch.capitalized-commentsnow extends xo's ignore pattern instead of replacingit. The pattern exists so autofix does not capitalise commented-out code,
which then has to be un-capitalised when you uncomment it. Ours was forked
from xo's years ago and had drifted: we were missing the starts xo added since
(
if (,for (,while (,switch (,class,import,export,type-coverage:), and xo was missing three of ours (return,await,console). Both sets now apply, and anything xo adds later arrives on its own.Almost entirely a widening, but not purely: xo matches
constwith atrailing space where our old pattern matched a bare
const, so a prose commentthat merely starts with those letters —
// constant— is now reported whereit was not. One such report across 434 files.
Minor Changes
@typescript-eslint/strict-boolean-expressionsis now off. It arrived inv26.0.0 with the move to
eslint-config-xo, which enables it withallowStringandallowNumbertightened tofalse. It was the single largestsource of TypeScript-only reports in the config, and measurement did not
justify the cost: 165 reports across 294 TypeScript files in three
consumers, with no genuine defect in a 34-report sample spanning every
category the rule distinguishes. What it flagged was optional string
attributes,
|| ''defaults and guard clauses — cases where'',0andabsent legitimately mean the same thing.
Loosening it rather than removing it does not work, which is worth recording
because it is the obvious first idea. Setting
allowString/allowNumberbackto the plugin defaults clears only 21% of the reports, because three quarters
of the remainder is
string | undefinedin a condition — rejected by xo and bythe rule's own defaults alike. Allowing enough to clear that leaves eight
reports, and none of those is a defect either.
Upstream has declined to loosen the rule
(xojs/eslint-config-xo#108),
so this is ours to set rather than something to wait on. Projects that want it
can turn it back on in their own config.
No project gains a report. Anyone who has already rewritten conditions to
satisfy it keeps working code; the rule simply stops asking.
Twenty entries that restated a value
eslint-config-xoalready sets havebeen removed. No rule changes severity or options as a result — every one was
verified to resolve identically with and without our line, and the rule
inventory is unchanged across the removal.
What it changes is the future. A rule we no longer name is one we would follow
xo on if it changed its position, rather than silently pinning the old value.
That is deliberate: restating a value is a standing commitment to track every
option that rule later grows, and two of our entries had already drifted out of
step that way without anyone noticing.
v27.1.0Compare Source
Minor Changes
@typescript-eslint/no-restricted-typesis now scoped to TypeScript files.We had it configured in the layer that covers every code file, which quietly
made the
@typescript-eslintplugin mandatory for linting anything at all. Aproject with no TypeScript installed did not skip the rule, it failed outright:
No project gains or loses a report. The rule only ever matches type
annotations, so it could not fire on JavaScript in the first place — measured
against a real consumer project it changed nothing across 66 TypeScript files
and 120 single-file components, and the rule inventory records exactly one
difference, on the JavaScript probe. What changes is that a JavaScript-only
project can now lint with
typescriptabsent fromnode_modules.Note that npm may install TypeScript anyway.
eslint-config-xodepends ontypescript-eslint, which declares a requiredtypescriptpeer, so aproject with no TypeScript still gets roughly 31 MB of it. Nothing in this
config can prevent that; it needs a fix upstream, which we have reported as
xojs/eslint-config-xo#126.
v27.0.0Compare Source
Major Changes
Update
eslint-config-xoto v2, which moveseslint-plugin-unicornfromv73 to v74. The bump adds, removes and reconfigures no unicorn rule — v74's
changes are fixes to rules we already run. Measured against a real consumer
project, it produced three fewer reports across 64 TypeScript files, where
unicorn/prefer-number-coercionandunicorn/prefer-string-replace-allhadbeen flagging cases they misread.
n/prefer-process-get-builtin-moduleis now on, added by xo v2. It reportsrequire('node:fs')andawait import('node:fs')for built-in modules andwants
process.getBuiltinModule('node:fs')instead. It is not auto-fixable,so whatever it catches has to be edited by hand. This is the only rule the
upgrade turns on, and the only source of new errors in it.
Most projects will never see it. The rule switches itself off unless the
nearest
package.jsondeclares anengines.nodefalling entirely within^20.16.0 || >=22.3.0— the versions whereprocess.getBuiltinModuleisguaranteed to exist. A package with no
engines.nodeat all, or one as looseas
>=20, is left alone.Where it does apply, the payoff is in ES modules, where it removes the need
for
createRequire. It fires in CommonJS too, whererequireis the nativeidiom and the rewrite buys nothing, so build scripts and
.cjsfiles are thelikeliest place to meet it. Turn it off for those paths in your own config if
it is noisy:
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.