Repository navigation
v27.0.0
Major Changes
-
Update
eslint-config-xoto v2, which moveseslint-plugin-unicornfrom
v73 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-allhad
been flagging cases they misread. -
n/prefer-process-get-builtin-moduleis now on, added by xo v2. It reports
require('node:fs')andawait import('node:fs')for built-in modules and
wantsprocess.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
nearestpackage.jsondeclares anengines.nodefalling entirely within
^20.16.0 || >=22.3.0— the versions whereprocess.getBuiltinModuleis
guaranteed to exist. A package with noengines.nodeat all, or one as loose
as>=20, is left alone.Where it does apply, the payoff is in ES modules, where it removes the need
forcreateRequire. It fires in CommonJS too, whererequireis the native
idiom and the rewrite buys nothing, so build scripts and.cjsfiles are the
likeliest place to meet it. Turn it off for those paths in your own config if
it is noisy:{ files: ['**/*.cjs'], rules: { 'n/prefer-process-get-builtin-module': 'off' }, }