Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
v38.0.1
v38.0.0
v37.0.1
v37.0.0
New rules
Improvements
v36.0.0
New rules
Improvements
- Add
allconfig (#1512) a512ad1- This config includes all the rules, except deprecated ones.
prefer-spread: CheckString#split('')(#1489) d51a197prefer-module: Use suggestions for'use strict'directive (#1470) 57c7906error-message: Handle shadowedErrorconstructor (#1496) fdadd88
Fixes
v35.0.0
New rules
prefer-object-from-entries(#1308) 4a14187no-useless-length-check(#1398) 1107455no-useless-spread(#1401) 1463f52
Breaking
explicit-length-check: Removegreater-than-or-equaloption (#1397) db1a2b5- It enabled a style that no one actually uses.
Improvements
no-array-reduce: AddallowSimpleOperationsoption (#1418) 153eb2cno-array-callback-reference: Ignore jQuery methods (#1457) 7af9a6fprevent-abbreviations: Ignorei18nandl10n(#1445) efdd90eno-array-callback-reference: Ignore mobx-state-tree usage (#1455) 73c0dfdnew-for-builtins: CheckWeakRefandFinalizationRegistry(#1450) fce9d1dno-zero-fractions: Handle.0correctly (#1444) fcca35dnew-for-builtins: EnforcenewforSharedArrayBufferandProxy(#1438) 2ba83adno-null: AllowObject.create(null, …)(#1432) 768f301number-literal-case: Support Vue SFC (#1434) ee9f609no-object-as-default-parameter: Forbid destructuring (#1433) 3fcc4bbprefer-spread: Better auto-fix (#1426) 7bdf0ddprefer-array-some: Check cases comparing.find()withundefined(#1422) 3dc2f77no-useless-spread: Check useless "iterable to array" (#1414) 61bc6a3prefer-dom-node-text-content: Check destructuring, Use suggestion instead of auto-fix (#1417) c4bfc42require-post-message-target-origin: Disable for TypeScript files (#1415) 741484aprefer-add-event-listener: Update event types list (#1412) 7f88b2fno-instanceof-array: Support Vue SFC (#1410) 3b22917prevent-abbreviations: Adddef(#1402) f783472no-instanceof-array: Improve report location (#1389) 6512fbd- Use original quote when auto-fixing (#1411) bb81582
Fixes
v34.0.1
v34.0.0
New rules
no-array-method-this-argument(#1357) 96587f2require-post-message-target-origin(#1326) 03c540bprefer-top-level-await(#1325) 05722a1- Disabled in the recommended preset.
prefer-at(#1331) 8ca5b46- Disabled in the recommended preset.
Improvements
prefer-module: Ignore.cjsfiles (#1355) ebdc3c2error-message: SupportAggregateError(#1351) e7b4300filename-case: Enforce lowercased file extension (#1336) 119615bexpiring-todo-comments: More helpful error when no conditions (#1375) 914a996prefer-array-someandprefer-regexp-test: Support Vue SFC (#1364) a46050eexplicit-length-check: Supportv-showdirective (#1363) f163c4aexplicit-length-check: Support Vue SFC files (#1360) 9199611prefer-type-error: Improve report location (#1354) bc3d58bno-useless-undefined: IgnoreSet#add()Map#set()Array#{push,unshift}()(#1353) c6359c3prefer-prototype-methods: Only check methods from[]and{}(#1347) 29a4e75prefer-array-some: Report non-zero check onarray.filter().length(#1337) f8aaac2- Use
context.getPhysicalFilename()(#1344) e2540cb
Fixes
v33.0.1
v33.0.0
New rules
require-array-join-separator(#1284) 36e7103require-number-to-fixed-digits-argument(#1288) 4a30863prefer-prototype-methods(#1247) 7bde733prefer-object-has-own(#1322) ca34b40- Not enabled in the
recommendedpreset.
- Not enabled in the
Improvements
no-array-for-each: Handle only return statement insideiforelse(#1319) 298a104new-for-builtins&no-new-buffer: Handle line breaks afternewkeyword (#1301) d37439fprefer-array-flat-map: Remove check on[].concat(...array.map(…))(#1299) 128b5aaprefer-spread: Ignore{arrayBuffer,blob,buffer,file,this}.slice()(#1287) e18d5f2prefer-string-starts-ends-with: Add suggestions for safely handling non-strings (#1277) f14a9d1explicit-length-check: Ignorethis.{size,length}(#1289) ed85d00prefer-string-starts-ends-with-rule: Don't autofix known non-string values (#1281) a1c8984explicit-length-check: Ignore known, non-number length properties (#1264) 42f6487empty-brace-spaces: Support experimental syntax (#1276) fa68b6fprefer-dom-node-remove: Improve parentheses handling (#1254) 74e4d39