github sindresorhus/eslint-plugin-unicorn v77.0.0

3 hours ago

Breaking

  • Move CSS-only rules to eslint-cssicorn (#3811) c3697c0
    • unicorn/no-deprecated-css-features → cssicorn/no-deprecated-features
    • unicorn/no-duplicate-css-selectors → cssicorn/no-duplicate-selectors
    • unicorn/no-duplicate-font-family-names → cssicorn/no-duplicate-font-family-names
    • unicorn/no-invalid-media-features → cssicorn/no-invalid-media-features
    • unicorn/no-nesting-with-mixed-specificity → cssicorn/no-nesting-with-mixed-specificity
    • unicorn/no-redundant-nested-style-rules → cssicorn/no-redundant-nested-style-rules
    • unicorn/no-unknown-css-annotations → cssicorn/no-unknown-annotations
    • unicorn/no-unknown-pseudo-selectors → cssicorn/no-unknown-pseudo-selectors
    • unicorn/no-unscoped-css-nesting-selector → cssicorn/no-unscoped-nesting-selector
    • unicorn/prefer-explicit-viewport-units → cssicorn/prefer-explicit-viewport-units
    • unicorn/prefer-media-feature-range-syntax → cssicorn/prefer-media-feature-range-syntax
  • Remove the deprecated flat/recommended and flat/all configs (#3810) 6f989c6
    • Use recommended and all instead.

New rules

Improvements

  • Add recommended presets for non-JavaScript languages: recommended-css, recommended-html, recommended-json, recommended-markdown, recommended-toml, and recommended-yaml (#3810) 6f989c6
  • Add support for more languages in some rules (#3741) a330d28
    • JSON: consistent-compound-words, empty-brace-spaces, escape-case, name-replacements, no-manually-wrapped-comments, no-zero-fractions, number-literal-case, single-line-block-comment-style, string-content
    • CSS: consistent-compound-words, empty-brace-spaces, escape-case, id-match, name-replacements, no-zero-fractions, number-literal-case, relative-url-style, single-line-block-comment-style, string-content
    • HTML: consistent-compound-words, id-match, name-replacements, relative-url-style
    • Markdown: name-replacements, relative-url-style
    • YAML: consistent-compound-words, empty-brace-spaces, escape-case, name-replacements, no-manually-wrapped-comments, no-zero-fractions, number-literal-case, string-content
    • TOML: consistent-compound-words, empty-brace-spaces, name-replacements, no-zero-fractions
  • Let eslint-disable comments suppress reports instead of making rules skip the code, which made the directive look unused (#3783) 2428f98
  • no-asterisk-prefix-in-documentation-comments: Support CSS and JSON, and enable in recommended preset (#3725) d0f8a03
  • number-literal-case: Move from unopinionated to recommended preset 769e2d5
  • prefer-combined-guards: Add checkMultiStatementBodies option (#3760) 490ff39
  • prefer-simplified-conditions: Add negatedConditions option (#3778) 2bb9171
  • comment-content: Improve performance (#3763) cbe4b6b
  • consistent-conditional-object-spread: Report unnecessary boolean casts in logical mode (#3761) 1bc3b07
  • logical-assignment-operators: Support computed properties (#3739) 1c7901f
  • name-replacements: Prefer repository over repo (#3743) 54ff97f
  • no-await-in-promise-methods: Report nested await (#3758) 8c2c194
  • no-invalid-argument-count: Avoid false positives for spread arguments (#3781) 769208a
  • no-manually-wrapped-comments: Support block comments and CSS (#3744) 1e82f7a
  • no-shorthand-property-overrides: Improve shorthand detection (#3792) b1b8904
  • no-unnecessary-array-flat-map: Remove unnecessary singleton array wrappers (#3782) eedbb2c
  • prefer-default-parameters: Report bindings with consistent fallback expressions (#3780) 1ef535d
  • prefer-direct-iteration: Fix type inference for destructured bindings (#3809) 93ef59c
  • prefer-early-return, prefer-continue: Check guards after other statements in checkShortBodies (#3759) 6f405df
  • prefer-logical-operator-over-ternary: Only simplify boolean branches (#3768) d84d561
  • prefer-simple-condition-first: Handle typeof guards (#3740) 118000b
  • prefer-single-call: Make array call autofixes safe (#3770) bcb9394
  • prefer-single-object-destructuring: Inline local sources (#3779) fa417ff
  • prefer-uint8array-hex: Recognize more encoding patterns (#3791) dd24a9a

v76.0.0...v77.0.0

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

NewReleases is sending notifications on new releases.