Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

v32.0.1

10 May 06:07
Compare
Choose a tag to compare
  • prevent-abbreviations: Fix shorthand import/export detection (#1252) 4367479

v32.0.0...v32.0.1

v32.0.0

09 May 10:19
Compare
Choose a tag to compare

Breaking

New rules

Improvements

  • no-for-loop: Ignore known non-array loop variables (#1242) 29f6b45
  • prefer-array-find: Singularize variable name in autofix (#1243) 6b340a3
  • prefer-switch: Do not add braces to the default case (#1235) c241782
  • no-zero-fractions: Handle numeric separators, fix missing parentheses, improve report location (#1238) 2724afa
  • no-array-for-each: Better error message (#1239) 2e82dc8
  • prefer-switch: Avoid conflict with no-unreachable rule (#1234) 1c78d0c
  • prefer-optional-catch-binding: Support checking destructured errors (#1229) a0b2f4f
  • no-array-for-each: Support autofixing complicated parameters (#1228) d84143f
  • prefer-negative-index: Support Array#at() (#1217) 6443ee3
  • explicit-length-check: Check Set#size (#1226) 6a745a0
  • filename-case: Improve report position (#1227) 3d4ac1b

Fixes

  • prevent-abbreviations: Fix shorthand import/export detection (#1215) a669e31

v31.0.0...v32.0.0

v31.0.0

23 Apr 16:14
Compare
Choose a tag to compare

v30.0.0

19 Apr 13:16
Compare
Choose a tag to compare

New rules

Breaking

  • prevent-abbreviations: Rename options (#1164) cf42cc5
  • no-keyword-prefix: Rename blacklist option to disallowedPrefixes (#1180) 91e60d0

Improvements

Fixes

  • prefer-number-properties: Fix some edge cases (#1170) e7e25b8
  • prefer-number-properties: Fix some edge cases (part 2) (#1176) 3a58802
  • prefer-regexp-test: Do not fix if regexp has g flag (#1173) 8d97beb
  • no-array-for-each: Do not fix if callback parameter has type annotation (#1167) 0d4fc8b
  • no-useless-undefined: Do not report return undefined if function has returnType (#1165) 4ff39e0
  • prefer-set-has: Use suggestions if node has type annotation (#1158) 1221185
  • no-null: Exclude second argument of Node.insertBefore() (#1157) b16c316
  • prefer-add-event-listener: Fix crash on parenthesized cases (#1153) c95e854
  • Fix optional MemberExpression check when using ecmaVersion: 2019 (#1151) 56d5d9a
  • prefer-regexp-test: Do not fix if argument of String#match() is known not RegExp (#1152) 0abc394

v29.0.0...v30.0.0

v29.0.0

21 Mar 12:38
Compare
Choose a tag to compare

New rules

Improvements

  • no-array-for-each: Use let if parameters are reassigned (#1139) a13ad3c
  • no-array-push-push and prefer-ternary: Improve same reference detection (#1123) c2c28a6
  • prefer-spread: Add Array#slice() check (#1117) 8bdb52d

v28.0.2...v29.0.0

v28.0.2

18 Feb 05:11
Compare
Choose a tag to compare
  • prevent-abbreviations: Do not rename exported types when using @babel/eslint-parser (#1104) 9a91a3d
  • prevent-abbreviations: Do not rename exported TypeScript types (#1103) 5c08932

v28.0.1...v28.0.2

v28.0.1

15 Feb 10:57
Compare
Choose a tag to compare
  • Fix missing eslint-visitor-keys dependency (#1100) 5c1ff2e

v28.0.0...v28.0.1

v28.0.0

10 Feb 06:00
Compare
Choose a tag to compare

Improvements

Fixes

  • no-unreadable-array-destructuring: Fix crash on destructuring in for…of loop (#1076) 11ce1bc
  • no-array-for-each: Ignore React.Children.forEach (#1088) 5a931dd
  • prefer-string-slice: Keep optional chaining in autofix (#1085) acaf197
  • prefer-spread: Ignore Buffer.concat() (#1069) da685f7
  • Ignore unexpected case in catch-error-name and prefer-set-has (#1077) 79a64b1
  • prefer-default-parameters: Fix non-iterable visitorKeys (#1013) d707e83
  • consistent-destructuring: Add ExperimentalRestProperty check (#1060) aca2ec5

v27.0.0...v28.0.0

v27.0.0

22 Jan 19:00
Compare
Choose a tag to compare

New rules

Improvements

Fixes

  • prefer-query-selector: Fix crash on unexpected selector (#1034) 88018ca

v26.0.1...v27.0.0

v26.0.1

13 Jan 11:16
Compare
Choose a tag to compare
  • prefer-math-trunc: Use suggestion instead of auto-fix for x | 0 (#1014) 74b1b2d

v26.0.0...v26.0.1