npm eslint-plugin-unicorn 78.0.0

4 hours ago

New rules

Improvements

  • Add SOML support, including a recommended-soml preset (#3870) 7419b83
  • Report code that contains comments instead of ignoring it (#3847) 003f0bd
    • Many rules skipped code with comments. They now report it, and only withhold fixes that would remove comments. You may see new reports.
  • Fix cyclic resolution in type-aware checks (#3826) 5e77e19
  • prefer-default-parameters: Add checkFallbackExpressions option (#3837) 71bbf59
  • prefer-ternary: Add checkVaryingBase and checkComputedMemberAccess options (#3869) 1af3c2b
  • consistent-boolean-name: Allow does prefix by default (#3853) cfad028
  • consistent-boolean-name: Recognize promise-returning functions (#3879) 769e3b8
  • consistent-boolean-name: Fix cyclic type parameter resolution (#3821) 5c4808b
  • no-asterisk-prefix-in-documentation-comments: Remove shared indentation (#3820) a92aee1
  • no-await-in-promise-methods: Clarify the message for nested await (#3867) 8f73d53
  • no-immediate-mutation: Combine a declaration with an assignment that follows it immediately (#3851) 811e467
  • no-negated-condition: Support && and || chains of negated operands (#3834) 15bfade
  • no-top-level-side-effects: Allow known pure imported helpers, like defineConfig() and React memo(), and check default-exported expressions (#3822) 3826236
  • no-unnecessary-parameters: Fix false positive for recursive defaults (#3844) e2d8d0f
  • no-unnecessary-parameters: Ignore parameters named by type predicates (#3859) f0c631c
  • no-using-resource-escape: Check TypeScript instantiation expressions (#3833) 7a9f7df
  • prefer-at: Fix false positives for DOM collections (#3842) ca78a7a
  • prefer-combined-guards: Combine non-literal exits in TypeScript when type information is available (#3860) 2bcc7be
  • prefer-default-parameters: Support static template literal fallbacks (#3835) 3d8b40a
  • prefer-default-parameters: Support fallbacks to earlier bindings (#3840) d4bfc1c
  • prefer-default-parameters: Handle nullable fallback types (#3858) d75786f
  • prefer-early-return, prefer-continue: Suggest opposite relational comparisons (#3873) de2e6da
  • prefer-logical-operator-over-ternary: Handle non-boolean conditions (#3843) 5c4d50c
  • prefer-minimal-ternary: Ignore formatting differences in shared expressions (#3841) b0c2142
  • prefer-minimal-ternary: Prevent unsafe TypeScript object autofixes (#3846) 2f33c91
  • prefer-observer-apis: Check let and var listener functions, and ignore reassigned listeners (#3833) 7a9f7df
  • prefer-private-class-fields: Do not autofix reassigned methods, and suggest private arrow functions for bound methods (#3823) 6f0f4bb
  • prefer-scoped-selector: Ignore queries on more non-element roots, like ownerDocument and getRootNode() (#3833) 7a9f7df
  • prefer-spread: Prevent unsafe TypeScript autofixes (#3882) 21e99ff
  • prefer-ternary: Support destructuring assignments (#3852) e29d1ee
  • prefer-ternary: Support statements that differ in only one part, like call(test ? a : b) (#3869) 1af3c2b
  • prefer-top-level-await: Allow cached promise assignments (#3819) 2fb8eb6
  • prefer-top-level-await: Avoid false positives on non-promise calls (#3883) 3f125f1
  • relative-url-style: Support complex Markdown labels, embedded HTML in Markdown, JSX, URL.canParse(), URL.parse(), and more HTML attributes (#3854) 2760ce4
  • require-module-specifiers: Allow bare export {} in declaration files (#3866) e727481
  • template-indent: Ignore templates with content on the opening line (#3868) 921dd8c

v77.0.0...v78.0.0

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

NewReleases is sending notifications on new releases.