github sindresorhus/eslint-plugin-unicorn v80.0.0

24 minutes ago

Breaking

  • Require Node.js 22.13 (#3988) 6ae4251
  • no-async-promise-finally: Remove it from the recommended and unopinionated presets (#3989) b670841
    • The rule also reports async cleanup that handles its own errors, so it is now opt-in.

New rules

Improvements

  • Improve import performance by loading rules lazily (#3988) 6ae4251
  • Keep JSDoc type inference when an ESLint directive comment is between the JSDoc comment and the code (#3973) e1b5f7c
  • no-immediate-mutation: Add checkCollections option (#3995) d17cfc0
  • prefer-smaller-scope: Add checkTypeAliases option (#3955) a6c2fdf
  • prefer-ternary: Add checkNestedTernaries option (#3965) 08de788
  • prefer-uint8array-base64, prefer-uint8array-hex: Add checkBufferDecoding option, and autofix Buffer.fromBase64() and Buffer.fromHex() (#3980) d8e24da
  • consistent-boolean-name: Ignore underscore-only parameters in TypeScript type signatures (#3986) f0ae743
  • no-async-iterator-callback, no-async-promise-finally: Detect async callbacks in unreassigned local let and var bindings (#3989) b670841
  • no-immediate-mutation: Autofix more consecutive initializations (#3953) 8d9549a
  • no-null: Ignore Object.setPrototypeOf(foo, null) (#4005) 33941be
  • no-unnecessary-default-arguments: Check generic functions (#3966) 3267899
  • no-unnecessary-default-arguments: Autofix type-safe removals when type information is available (#3972) c9163ce
  • no-unnecessary-nested-ternary: Simplify longer ternary chains (#3974) 201c6a7
  • no-useless-coercion: Report redundant !! (#4000) 4f724e1
  • no-useless-undefined: Ignore return undefined in getters (#4004) a0df80f
  • prefer-json-import: Detect JSON loaded through createRequire(), with autofix (#3976) a8a814a
  • prefer-logical-operator-over-ternary: Handle ternaries with a null or undefined branch in truthiness checks (#3994) 7d98f9b
  • prefer-math-min-max: Only report comparisons of known numbers in TypeScript (#3967) cb13c2a
  • prefer-minimal-ternary: Support member chains (#3968) d85a52f
  • prefer-module: Ignore .cts files (#4002) ba41e94
  • prefer-simplified-conditions: Factor comparisons with any comparison operator (#3970) bf2986a
  • prefer-string-raw: Ignore strings in import and export specifiers (#3983) 38e4329
  • prefer-switch: Ignore if chains that would put an else if inside default (#3982) 6236734
  • relative-url-style: Reduce dependencies (#3971) a2748a1

v79.0.0...v80.0.0

Don't miss a new eslint-plugin-unicorn release

NewReleases is sending notifications on new releases.