sourcegraph / learn

Sourcegraph Learn: an educational hub to support all developers
https://learn.sourcegraph.com
Apache License 2.0
18 stars 34 forks source link

Update dependency eslint-plugin-unicorn to v40 #432

Closed renovate[bot] closed 2 years ago

renovate[bot] commented 2 years ago

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
eslint-plugin-unicorn 21.0.0 -> 40.0.0 age adoption passing confidence

Release Notes

sindresorhus/eslint-plugin-unicorn ### [`v40.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v40.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v39.0.0...v40.0.0) ##### New rules - [`no-thenable`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md) ([#​1616](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1616)) [`c318644`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c318644) - [`no-useless-promise-resolve-reject`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md) ([#​1623](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1623)) [`054436e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/054436e) - [`relative-url-style`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md) ([#​1672](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1672)) [`6ab705b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6ab705b) - [`prefer-json-parse-buffer`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md) ([#​1676](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1676)) [`84c9c70`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/84c9c70) ##### Improvements - `prefer-object-has-own`: Deprecate in favor of the built-in [`prefer-object-has-own`](https://eslint.org/docs/rules/prefer-object-has-own) rule ([#​1646](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1646)) [`e59a856`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e59a856) - `filename-case`: Ignore `[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint-plugin-unicorn](https://togithub.com/sindresorhus/eslint-plugin-unicorn) | [`21.0.0` -> `40.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-unicorn/21.0.0/40.0.0) | [![age](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/40.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/40.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/40.0.0/compatibility-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/40.0.0/confidence-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- in filenames ([#​1628](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1628)) [`a43a174`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a43a174) - `no-useless-promise-resolve-reject`: Detect unnecessary `Promise.resolve`/`reject` in promise callback functions ([#​1666](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1666)) [`f6215f3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f6215f3) - `prefer-export-from`: Support import assertions ([#​1618](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1618)) [`1d7a6b6`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1d7a6b6) - `prefer-top-level-await`: Improve top-level expression detection ([#​1526](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1526)) [`b054d65`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/b054d65) - `prefer-dom-node-dataset`: Check `.hasAttribute()` and `.getAttribute()` ([#​1673](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1673)) [`152f153`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/152f153) - `prefer-dom-node-dataset`: Check `.removeAttribute()` ([#​1668](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1668)) [`22d8d03`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/22d8d03) - `prefer-string-slice`: Improve fix ([#​1675](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1675)) [`267115a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/267115a) - `prefer-math-trunc`: Improve fix logic ([#​1670](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1670)) [`784c7a8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/784c7a8) - `prefer-string-slice`: Improve argument type detection ([#​1664](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1664)) [`03b0946`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/03b0946) - `prefer-add-event-listener`: Remove fix for `onerror` ([#​1650](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1650)) [`7bf63bb`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7bf63bb) - `no-array-push-push`: Ignore `process.{stdin,stdout,stderr}` ([#​1654](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1654)) [`10ad699`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/10ad699) - `no-new-array` & `no-new-buffer`: Improve argument type detection ([#​1648](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1648)) [`9b04e43`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/9b04e43) - `no-array-for-each`: Ignore `pIteration.forEach` ([#​1649](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1649)) [`2b92385`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/2b92385) - `no-array-callback-reference`: Ignore primitive wrappers in `Array#map()` ([#​1642](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1642)) [`0362c09`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0362c09) - `prefer-export-from`: Support "string literal specifier" ([#​1636](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1636)) [`0866b41`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0866b41) - `template-indent`: Check Jest inline snapshots by default ([#​1637](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1637)) [`64460e2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/64460e2) ##### Fixes - `prefer-dom-node-dataset`: Fix name conversion ([#​1674](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1674)) [`7fb6f7b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7fb6f7b) - `prefer-export-from`: Fix crash in TypeScript files ([#​1647](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1647)) [`1ff8e42`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1ff8e42) ### [`v39.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v39.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v38.0.1...v39.0.0) ##### New rules - [`prefer-code-point`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md) ([#​1584](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1584)) [`31c83cd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/31c83cd) - [`no-await-expression-member`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md) ([#​1586](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1586)) [`0485924`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0485924) ##### Improvements - `prefer-export-from`: Add [`ignoreUsedVariables` option](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md#ignoreusedvariables) ([#​1590](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1590)) [`a8d52e4`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a8d52e4) - `prevent-abbreviations`: Show file basename instead of full path ([#​1593](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1593)) [`7c2867d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7c2867d) - Remove `require-post-message-target-origin` rule from recommended config ([#​1581](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1581)) [`014b4dc`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/014b4dc) ##### Fixes - `no-empty-file`: Fix false positive with triple-slash directives ([#​1605](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1605)) [`6354bb8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6354bb8) - `require-number-to-fixed-digits-argument`: Ignore `.toFixed` from new expression ([#​1601](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1601)) [`20d61e7`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/20d61e7) - `prefer-export-from`: Fix bug on fixing export namespace as default ([#​1583](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1583)) [`b564ff1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/b564ff1) - Add missing `additionalProperties` to schema ([#​1589](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1589)) [`579d05d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/579d05d) ### [`v38.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v38.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v38.0.0...v38.0.1) - `prefer-export-from`: Ignore variables with type ([#​1580](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1580)) [`ea49b21`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ea49b21) ### [`v38.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v38.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v37.0.1...v38.0.0) ##### New rules - [`no-empty-file`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md) ([#​1506](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1506)) [`a2ba25e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a2ba25e) - [`prefer-export-from`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md) ([#​1453](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1453)) [`ff43745`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ff43745) ##### Improvements - Ignore Ramda methods in rules ([#​1557](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1557)) [`5f3bad5`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5f3bad5) - `no-array-callback-reference`: Only ignore `Boolean` in reasonable places ([#​1570](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1570)) [`46f8638`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/46f8638) - `require-array-join-separator`: Check optional member ([#​1569](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1569)) [`15f9028`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/15f9028) ### [`v37.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v37.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v37.0.0...v37.0.1) - Fix compatibility with ESLint 7 ([#​1548](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1548)) [`e6cee0f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e6cee0f) ### [`v37.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v37.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v36.0.0...v37.0.0) ##### New rules - [`template-indent`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md) ([#​1478](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1478)) [`5f4c440`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5f4c440) ##### Improvements - Support ESLint 8 ([#​1488](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1488)) [`e97ab7e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e97ab7e) - Use `'latest'` as `ecmaVersion` ([#​1465](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1465)) [`9feb181`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/9feb181) ### [`v36.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v36.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v35.0.0...v36.0.0) ##### New rules - [`no-useless-fallback-in-spread`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md) ([#​1481](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1481)) [`1675118`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1675118) - [`no-invalid-remove-event-listener`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md) ([#​1216](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1216)) [`f0ff04d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f0ff04d) ##### Improvements - Add [`all`](https://togithub.com/sindresorhus/eslint-plugin-unicorn#all-config) config ([#​1512](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1512)) [`a512ad1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a512ad1) - This config includes all the rules, except deprecated ones. - `prefer-spread`: Check `String#split('')` ([#​1489](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1489)) [`d51a197`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d51a197) - `prefer-module`: Use suggestions for `'use strict'` directive ([#​1470](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1470)) [`57c7906`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/57c7906) - `error-message`: Handle shadowed `Error` constructor ([#​1496](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1496)) [`fdadd88`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/fdadd88) ##### Fixes - `prefer-spread`: Fix false negative on array constants ([#​1474](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1474)) [`4162145`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4162145) ### [`v35.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v35.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v34.0.1...v35.0.0) ##### New rules - [`prefer-object-from-entries`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md) ([#​1308](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1308)) [`4a14187`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4a14187) - [`no-useless-length-check`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md) ([#​1398](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1398)) [`1107455`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1107455) - [`no-useless-spread`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md) ([#​1401](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1401)) [`1463f52`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1463f52) ##### Breaking - `explicit-length-check`: Remove `greater-than-or-equal` option ([#​1397](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1397)) [`db1a2b5`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/db1a2b5) - It enabled a style that no one actually uses. ##### Improvements - `no-array-reduce`: Add [`allowSimpleOperations`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md#allowsimpleoperations) option ([#​1418](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1418)) [`153eb2c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/153eb2c) - `no-array-callback-reference`: Ignore jQuery methods ([#​1457](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1457)) [`7af9a6f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7af9a6f) - `prevent-abbreviations`: Ignore `i18n` and `l10n` ([#​1445](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1445)) [`efdd90e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/efdd90e) - `no-array-callback-reference`: Ignore mobx-state-tree usage ([#​1455](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1455)) [`73c0dfd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/73c0dfd) - `new-for-builtins`: Check `WeakRef` and `FinalizationRegistry` ([#​1450](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1450)) [`fce9d1d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/fce9d1d) - `no-zero-fractions`: Handle `.0` correctly ([#​1444](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1444)) [`fcca35d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/fcca35d) - `new-for-builtins`: Enforce `new` for `SharedArrayBuffer` and `Proxy` ([#​1438](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1438)) [`2ba83ad`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/2ba83ad) - `no-null`: Allow `Object.create(null, …)` ([#​1432](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1432)) [`768f301`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/768f301) - `number-literal-case`: Support Vue SFC ([#​1434](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1434)) [`ee9f609`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ee9f609) - `no-object-as-default-parameter`: Forbid destructuring ([#​1433](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1433)) [`3fcc4bb`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3fcc4bb) - `prefer-spread`: Better auto-fix ([#​1426](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1426)) [`7bdf0dd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7bdf0dd) - `prefer-array-some`: Check cases comparing `.find()` with `undefined` ([#​1422](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1422)) [`3dc2f77`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3dc2f77) - `no-useless-spread`: Check useless "iterable to array" ([#​1414](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1414)) [`61bc6a3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/61bc6a3) - `prefer-dom-node-text-content`: Check destructuring, Use suggestion instead of auto-fix ([#​1417](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1417)) [`c4bfc42`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c4bfc42) - `require-post-message-target-origin`: Disable for TypeScript files ([#​1415](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1415)) [`741484a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/741484a) - `prefer-add-event-listener`: Update event types list ([#​1412](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1412)) [`7f88b2f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7f88b2f) - `no-instanceof-array`: Support Vue SFC ([#​1410](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1410)) [`3b22917`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3b22917) - `prevent-abbreviations`: Add `def` ([#​1402](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1402)) [`f783472`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f783472) - `no-instanceof-array`: Improve report location ([#​1389](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1389)) [`6512fbd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6512fbd) - Use original quote when auto-fixing ([#​1411](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1411)) [`bb81582`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/bb81582) ##### Fixes - `throw-new-error`: Fix an edge case ([#​1390](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1390)) [`806831b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/806831b) - Fix cases without space after keywords ([#​1436](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1436)) [`179b7df`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/179b7df) ### [`v34.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v34.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v34.0.0...v34.0.1) - `no-array-method-this-argument`: Fix false positives ([#​1386](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1386)) [`d364d67`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d364d67) ### [`v34.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v34.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v33.0.1...v34.0.0) ##### New rules - [`no-array-method-this-argument`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md) ([#​1357](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1357)) [`96587f2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/96587f2) - [`require-post-message-target-origin`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md) ([#​1326](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1326)) [`03c540b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/03c540b) - [`prefer-top-level-await`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md) ([#​1325](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1325)) [`05722a1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/05722a1) - Disabled in the recommended preset. - [`prefer-at`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md) ([#​1331](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1331)) [`8ca5b46`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/8ca5b46) - Disabled in the recommended preset. ##### Improvements - `prefer-module`: Ignore `.cjs` files ([#​1355](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1355)) [`ebdc3c2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ebdc3c2) - `error-message`: Support `AggregateError` ([#​1351](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1351)) [`e7b4300`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e7b4300) - `filename-case`: Enforce lowercased file extension ([#​1336](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1336)) [`119615b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/119615b) - `expiring-todo-comments`: More helpful error when no conditions ([#​1375](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1375)) [`914a996`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/914a996) - `prefer-array-some` and `prefer-regexp-test`: Support Vue SFC ([#​1364](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1364)) [`a46050e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a46050e) - `explicit-length-check`: Support `v-show` directive ([#​1363](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1363)) [`f163c4a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f163c4a) - `explicit-length-check`: Support Vue SFC files ([#​1360](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1360)) [`9199611`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/9199611) - `prefer-type-error`: Improve report location ([#​1354](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1354)) [`bc3d58b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/bc3d58b) - `no-useless-undefined`: Ignore `Set#add()` `Map#set()` `Array#{push,unshift}()` ([#​1353](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1353)) [`c6359c3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c6359c3) - `prefer-prototype-methods`: Only check methods from `[]` and `{}` ([#​1347](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1347)) [`29a4e75`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/29a4e75) - `prefer-array-some`: Report non-zero check on `array.filter().length` ([#​1337](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1337)) [`f8aaac2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f8aaac2) - Use `context.getPhysicalFilename()` ([#​1344](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1344)) [`e2540cb`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e2540cb) ##### Fixes - `prefer-array-find` and `prefer-at`: Fix crash on LHS zero index access ([#​1373](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1373)) [`da1f6d8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/da1f6d8) - `prefer-prototype-methods`: Fix a missing condition on object literal check ([#​1332](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1332)) [`cec7f11`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/cec7f11) ### [`v33.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v33.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v33.0.0...v33.0.1) - `prefer-prototype-methods`: Ignore known object literal methods ([#​1330](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1330)) [`639e7af`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/639e7af) ### [`v33.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v33.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v32.0.1...v33.0.0) ##### New rules - [`require-array-join-separator`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md) ([#​1284](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1284)) [`36e7103`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/36e7103) - [`require-number-to-fixed-digits-argument`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md) ([#​1288](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1288)) [`4a30863`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4a30863) - [`prefer-prototype-methods`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md) ([#​1247](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1247)) [`7bde733`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7bde733) - [`prefer-object-has-own`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-has-own.md) ([#​1322](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1322)) [`ca34b40`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ca34b40) - Not enabled in the `recommended` preset. ##### Improvements - `no-array-for-each`: Handle only return statement inside `if` or `else` ([#​1319](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1319)) [`298a104`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/298a104) - `new-for-builtins` & `no-new-buffer`: Handle line breaks after `new` keyword ([#​1301](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1301)) [`d37439f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d37439f) - `prefer-array-flat-map`: Remove check on `[].concat(...array.map(…))` ([#​1299](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1299)) [`128b5aa`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/128b5aa) - `prefer-spread`: Ignore `{arrayBuffer,blob,buffer,file,this}.slice()` ([#​1287](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1287)) [`e18d5f2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e18d5f2) - `prefer-string-starts-ends-with`: Add suggestions for safely handling non-strings ([#​1277](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1277)) [`f14a9d1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f14a9d1) - `explicit-length-check`: Ignore `this.{size,length}` ([#​1289](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1289)) [`ed85d00`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ed85d00) - `prefer-string-starts-ends-with-rule`: Don't autofix known non-string values ([#​1281](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1281)) [`a1c8984`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a1c8984) - `explicit-length-check`: Ignore known, non-number length properties ([#​1264](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1264)) [`42f6487`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/42f6487) - `empty-brace-spaces`: Support experimental syntax ([#​1276](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1276)) [`fa68b6f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/fa68b6f) - `prefer-dom-node-remove`: Improve parentheses handling ([#​1254](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1254)) [`74e4d39`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/74e4d39) ##### Fixes - `prefer-array-flat`: Fix incorrect fix, check `Array.prototype.concat.call` ([#​1317](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1317)) [`f6a939c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f6a939c) ### [`v32.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v32.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v32.0.0...v32.0.1) - `prevent-abbreviations`: Fix shorthand import/export detection ([#​1252](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1252)) [`4367479`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4367479) ### [`v32.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v32.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v31.0.0...v32.0.0) ##### Breaking - Drop support for Node.js v10 ([#​1211](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1211)) [`a8e9f26`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a8e9f26) - Drop support for `babel-eslint` ([#​1211](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1211)) [`a8e9f26`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a8e9f26) [You should migrate to `@babel/eslint-parser`](https://togithub.com/babel/babel-eslint#note-babel-eslint-is-now-babeleslint-parser-and-has-moved-into-the-babel-monorepo) ##### New rules - [`no-document-cookie`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md) ([#​1244](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1244)) [`866c4a3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/866c4a3) - [`numeric-separators-style`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md) - Was previously disabled. - [`prefer-array-flat`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md) - Was previously disabled. - [`prefer-array-flat-map`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md) - Was previously disabled. ##### Improvements - `no-for-loop`: Ignore known non-array loop variables ([#​1242](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1242)) [`29f6b45`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/29f6b45) - `prefer-array-find`: Singularize variable name in autofix ([#​1243](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1243)) [`6b340a3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6b340a3) - `prefer-switch`: Do not add braces to the default case ([#​1235](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1235)) [`c241782`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c241782) - `no-zero-fractions`: Handle numeric separators, fix missing parentheses, improve report location ([#​1238](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1238)) [`2724afa`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/2724afa) - `no-array-for-each`: Better error message ([#​1239](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1239)) [`2e82dc8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/2e82dc8) - `prefer-switch`: Avoid conflict with `no-unreachable` rule ([#​1234](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1234)) [`1c78d0c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1c78d0c) - `prefer-optional-catch-binding`: Support checking destructured errors ([#​1229](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1229)) [`a0b2f4f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a0b2f4f) - `no-array-for-each`: Support autofixing complicated parameters ([#​1228](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1228)) [`d84143f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d84143f) - `prefer-negative-index`: Support `Array#at()` ([#​1217](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1217)) [`6443ee3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6443ee3) - `explicit-length-check`: Check `Set#size` ([#​1226](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1226)) [`6a745a0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/6a745a0) - `filename-case`: Improve report position ([#​1227](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1227)) [`3d4ac1b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3d4ac1b) ##### Fixes - `prevent-abbreviations`: Fix shorthand import/export detection ([#​1215](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1215)) [`a669e31`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a669e31) ### [`v31.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v31.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v30.0.0...v31.0.0) #### New rules - [`prefer-node-protocol`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md) ([#​1203](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1203)) [`b1a5f53`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/b1a5f53) - [`prefer-module`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md) ([#​1141](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1141)) [`a7e393c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a7e393c) ### [`v30.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v30.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v29.0.0...v30.0.0) ##### New rules - [`prefer-switch`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md) ([#​1181](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1181)) [`10e7a0c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/10e7a0c) ##### Breaking - `prevent-abbreviations`: Rename options ([#​1164](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1164)) [`cf42cc5`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/cf42cc5) - `no-keyword-prefix`: Rename `blacklist` option to `disallowedPrefixes` ([#​1180](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1180)) [`91e60d0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/91e60d0) ##### Improvements - `no-array-push-push`: Add `ignore` option ([#​1168](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1168)) [`f9262d9`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f9262d9) - `prefer-spread`: Report `array.slice(0)` ([#​1182](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1182)) [`92bebe1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/92bebe1) - `no-useless-undefined`: Handle parenthesized `undefined` ([#​1178](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1178)) [`c88882e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c88882e) - `no-array-for-each`: Improve fixable parameter detection ([#​1177](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1177)) [`18d1ac2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/18d1ac2) - `prefer-array-flat-map`: Exclude `React.Children.map().flat()` ([#​1159](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1159)) [`3e6b6fb`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3e6b6fb) - `better-regex`: Report parsing errors ([#​1133](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1133)) [`51ee030`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/51ee030) - `filename-case`: Uniquify suggestion filenames ([#​1160](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1160)) [`a87238f`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a87238f) - Support `PropertyDefinition` ([#​1127](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1127)) [`75c4d78`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/75c4d78) ##### Fixes - `prefer-number-properties`: Fix some edge cases ([#​1170](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1170)) [`e7e25b8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e7e25b8) - `prefer-number-properties`: Fix some edge cases (part 2) ([#​1176](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1176)) [`3a58802`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/3a58802) - `prefer-regexp-test`: Do not fix if regexp has `g` flag ([#​1173](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1173)) [`8d97beb`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/8d97beb) - `no-array-for-each`: Do not fix if callback parameter has type annotation ([#​1167](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1167)) [`0d4fc8b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0d4fc8b) - `no-useless-undefined`: Do not report `return undefined` if function has `returnType` ([#​1165](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1165)) [`4ff39e0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4ff39e0) - `prefer-set-has`: Use suggestions if node has type annotation ([#​1158](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1158)) [`1221185`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/1221185) - `no-null`: Exclude second argument of `Node.insertBefore()` ([#​1157](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1157)) [`b16c316`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/b16c316) - `prefer-add-event-listener`: Fix crash on parenthesized cases ([#​1153](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1153)) [`c95e854`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c95e854) - Fix optional `MemberExpression` check when using `ecmaVersion: 2019` ([#​1151](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1151)) [`56d5d9a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/56d5d9a) - `prefer-regexp-test`: Do not fix if argument of `String#match()` is known not `RegExp` ([#​1152](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1152)) [`0abc394`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0abc394) ### [`v29.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v29.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.2...v29.0.0) ##### New rules - [`no-static-only-class`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md) ([#​1120](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1120)) [`f3b2441`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f3b2441) - [`prefer-array-flat`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md) ([#​1126](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1126)) [`2397d94`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/2397d94) ##### Improvements - `no-array-for-each`: Use `let` if parameters are reassigned ([#​1139](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1139)) [`a13ad3c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a13ad3c) - `no-array-push-push` and `prefer-ternary`: Improve same reference detection ([#​1123](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1123)) [`c2c28a6`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c2c28a6) - `prefer-spread`: Add `Array#slice()` check ([#​1117](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1117)) [`8bdb52d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/8bdb52d) ### [`v28.0.2`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v28.0.2) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.1...v28.0.2) - `prevent-abbreviations`: Do not rename exported types when using [@​babel/eslint-parser](https://togithub.com/babel/eslint-parser) ([#​1104](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1104)) [`9a91a3d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/9a91a3d) - `prevent-abbreviations`: Do not rename exported TypeScript types ([#​1103](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1103)) [`5c08932`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5c08932) ### [`v28.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v28.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.0...v28.0.1) - Fix missing `eslint-visitor-keys` dependency ([#​1100](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1100)) [`5c1ff2e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5c1ff2e) ### [`v28.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v28.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v27.0.0...v28.0.0) ##### Improvements - `no-lonely-if`: Keep all comments ([#​1047](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1047)) [`da94ca9`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/da94ca9) - `prefer-includes`: Add `Array#some()` check ([#​1097](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1097)) [`ee3a2e5`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ee3a2e5) - `prefer-includes`: Improve report location ([#​1061](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1061)) [`83575a8`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/83575a8) - `prefer-spread`: Improve auto-fix ([#​1080](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1080)) [`e54dc66`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e54dc66) - `prefer-spread`: Add more suggestions for `.concat` fix ([#​1054](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1054)) [`673c440`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/673c440) ##### Fixes - `no-unreadable-array-destructuring`: Fix crash on destructuring in `for…of` loop ([#​1076](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1076)) [`11ce1bc`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/11ce1bc) - `no-array-for-each`: Ignore `React.Children.forEach` ([#​1088](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1088)) [`5a931dd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5a931dd) - `prefer-string-slice`: Keep optional chaining in autofix ([#​1085](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1085)) [`acaf197`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/acaf197) - `prefer-spread`: Ignore `Buffer.concat()` ([#​1069](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1069)) [`da685f7`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/da685f7) - Ignore unexpected case in `catch-error-name` and `prefer-set-has` ([#​1077](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1077)) [`79a64b1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/79a64b1) - `prefer-default-parameters`: Fix non-iterable `visitorKeys` ([#​1013](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1013)) [`d707e83`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d707e83) - `consistent-destructuring`: Add `ExperimentalRestProperty` check ([#​1060](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1060)) [`aca2ec5`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/aca2ec5) ### [`v27.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v27.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v26.0.1...v27.0.0) ##### New rules - [`no-array-for-each`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-for-each.md) ([#​1017](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1017)) [`719cd00`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/719cd00) - [`no-array-push-push`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-push-push.md) ([#​1015](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1015)) [`21537d7`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/21537d7) - [`no-this-assignment`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-this-assignment.md) ([#​1018](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1018)) [`62a2f92`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/62a2f92) ##### Improvements - `prefer-ternary`: Add [`only-single-line`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-ternary.md#options) option ([#​1025](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1025)) [`306c9e7`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/306c9e7) - `numeric-separators-style`: Add [`onlyIfContainsSeparator`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/numeric-separators-style.md#options) option ([#​916](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/916)) [`8d32574`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/8d32574) - `prefer-spread`: Prefer `...` over `Array#concat()` ([#​1029](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1029)) [`cda72bd`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/cda72bd) - `prefer-spread`: Fix more `.concat` cases ([#​1042](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1042)) [`c3c7ba3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c3c7ba3) - `no-array-callback-reference`: Improve suggestions for `Array#forEach()` ([#​1049](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1049)) [`77bcdc6`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/77bcdc6) - `no-new-buffer`: Use suggestion for unknown arguments ([#​1037](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1037)) [`88a724c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/88a724c) - `no-unreadable-array-destructuring`: Add auto-fix ([#​1010](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1010)) [`27bc3c3`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/27bc3c3) - `new-for-builtins`: Better auto-fix ([#​1022](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1022)) [`5ba0f83`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5ba0f83) - `no-instanceof-array`: Better auto-fix ([#​1020](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1020)) [`0520f31`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/0520f31) ##### Fixes - `prefer-query-selector`: Fix crash on unexpected selector ([#​1034](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1034)) [`88018ca`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/88018ca) ### [`v26.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v26.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v26.0.0...v26.0.1) - `prefer-math-trunc`: Use suggestion instead of auto-fix for `x | 0` ([#​1014](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1014)) [`74b1b2d`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/74b1b2d) ### [`v26.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v26.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.1...v26.0.0) ##### New rules - [`no-new-array`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-array.md) ([#​992](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/992)) [`48390c1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/48390c1) - [`prefer-array-index-of`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-index-of.md) ([#​920](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/920)) [`517a782`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/517a782) - [`prefer-regexp-test`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-regexp-test.md) ([#​970](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/970)) [`7b74b40`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/7b74b40) - [`consistent-destructuring`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-destructuring.md) ([#​325](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/325)) [`32bd31c`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/32bd31c) ##### Improvements - Remove `import-index` rule from recommended preset ([#​977](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/977)) [`ff1cd2e`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/ff1cd2e) - `prefer-string-starts-ends-with`: Remove check on `String#match()` ([#​1002](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/1002)) [`c9fa8b1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c9fa8b1) - `no-array-callback-reference`: Ignore `AwaitExpression` except `reduce` and `reduceRight` ([#​814](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/814)) [`4c2b00b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/4c2b00b) ##### Fixes - `prefer-string-starts-ends-with`: Fix missing parentheses for some cases ([#​976](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/976)) [`e2f94fe`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/e2f94fe) - Don't consider `??` operator LogicExpression as a `boolean` value node ([#​986](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/986)) [`dc7f79b`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/dc7f79b) ### [`v25.0.1`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v25.0.1) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.0...v25.0.1) - Fix deprecated rules ([#​968](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/968)) https://github.com/sindresorhus/eslint-plugin-unicorn/commit/9921acc966b8b4c7baac4a2a13f141a630a367fe ### [`v25.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v25.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v24.0.0...v25.0.0) ##### New rules - [`prefer-array-some`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-some.md) ([#​887](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/887)) [`b6a5a50`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/b6a5a50) - [`prefer-default-parameters`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-default-parameters.md) ([#​632](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/632)) [`8015768`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/8015768) ##### Renamed rules We improved the naming and name consistency of some rules. Sorry about the churn. If you use the recommended preset and you're not overriding any rules, you don't need to do anything. - `no-fn-reference-in-iterator` → `no-array-callback-reference` - `no-array-instanceof` → `no-instanceof-array` - `no-reduce` → `no-array-reduce` - `prefer-dataset` → `prefer-dom-node-dataset` - `prefer-flat-map` → `prefer-array-flat-map` - `prefer-replace-all` → `prefer-string-replace-all` - `prefer-starts-ends-with` → `prefer-string-starts-ends-with` - `prefer-text-content` → `prefer-dom-node-text-content` - `prefer-trim-start-end` → `prefer-string-trim-start-end` - `prefer-event-key` → `prefer-keyboard-event-key` - `prefer-node-append` → `prefer-dom-node-append` - `prefer-node-remove` → `prefer-dom-node-remove` [`20c6341`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/20c6341) ##### Improvements - `explicit-length-check`: Make rule work in many more cases ([#​943](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/943)) [`f3bc798`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f3bc798) - `explicit-length-check`: Check unsafe `LogicalExpression`s ([#​952](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/952)) [`a1b60ad`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/a1b60ad) - `explicit-length-check`: Check `Boolean(foo.length)` ([#​951](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/951)) [`f4577f7`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/f4577f7) - `explicit-length-check`: Check more cases ([#​941](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/941)) [`83a6453`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/83a6453) - `new-for-builtins`: Ignore `Object(x) === x` and `Object(x) !== x` ([#​944](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/944)) [`5c7ea92`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/5c7ea92) - `explicit-length-check`: Rewrite rule ([#​938](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/938)) [`94ae87a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/94ae87a) ### [`v24.0.0`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/releases/v24.0.0) [Compare Source](https://togithub.com/sindresorhus/eslint-plugin-unicorn/compare/v23.0.0...v24.0.0) ##### New rules - [`no-lonely-if`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-lonely-if.md) ([#​936](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/936)) [`485dbf9`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/485dbf9) - [`empty-brace-spaces`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/empty-brace-spaces.md) ([#​933](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/933)) [`c137daa`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/c137daa) - [`prefer-date-now`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-date-now.md) ([#​935](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/935)) [`d0c4826`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/d0c4826) ##### I

Configuration

📅 Schedule: "on the 1st through 7th day of the month" in timezone America/Los_Angeles.

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by WhiteSource Renovate. View repository job log here.

netlify[bot] commented 2 years ago

✔️ Deploy Preview for sourcegraph-learn ready!

🔨 Explore the source changes: d45b3b30e8f48dfa4a01f432c948adfad089e2b1

🔍 Inspect the deploy log: https://app.netlify.com/sites/sourcegraph-learn/deploys/61d141a208a8260007db2b7d

😎 Browse the preview: https://deploy-preview-432--sourcegraph-learn.netlify.app