Skip to content

Commit 587a0ce

Browse files
committed
Auto merge of #3135 - rust-lang:renovate/eslint-plugin-unicorn-25.x, r=Turbo87
Update dependency eslint-plugin-unicorn to v25 [![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) | [`24.0.0` -> `25.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-unicorn/24.0.0/25.0.0) | [![age](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/25.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/25.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/25.0.0/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/eslint-plugin-unicorn/25.0.0/confidence-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>sindresorhus/eslint-plugin-unicorn</summary> ### [`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) ([#&#8203;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) ([#&#8203;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 ([#&#8203;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 ([#&#8203;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)` ([#&#8203;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 ([#&#8203;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` ([#&#8203;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 ([#&#8203;938](https://togithub.com/sindresorhus/eslint-plugin-unicorn/issues/938)) [`94ae87a`](https://togithub.com/sindresorhus/eslint-plugin-unicorn/commit/94ae87a) </details> --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/rust-lang/crates.io).
2 parents 025cf16 + 9ee61a4 commit 587a0ce

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
'ember-concurrency/no-perform-without-catch': 'warn',
3939
'ember-concurrency/require-task-name-suffix': 'error',
4040

41+
'unicorn/explicit-length-check': ['error', { 'non-zero': 'not-equal' }],
4142
// disabled because we need `null` since JSON has no `undefined`
4243
'unicorn/no-null': 'off',
4344
// disabled because this rule conflicts with prettier
@@ -84,7 +85,7 @@ module.exports = {
8485
files: ['mirage/**/*.js'],
8586
rules: {
8687
// disabled because of different `.find()` meaning
87-
'unicorn/no-fn-reference-in-iterator': 'off',
88+
'unicorn/no-array-callback-reference': 'off',
8889
},
8990
},
9091

app/controllers/crate/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default class CrateVersionController extends Controller {
8181
versions.push(version.getProperties('id', 'num'));
8282
});
8383
}
84-
if (extra.length > 0) {
84+
if (extra.length !== 0) {
8585
versions.push({
8686
id: null,
8787
num: 'Other',
@@ -136,7 +136,7 @@ export default class CrateVersionController extends Controller {
136136
// if we know about a successful docs.rs build, we'll return a link to that
137137
if (this.loadDocsBuildsTask.lastSuccessful) {
138138
let docsBuilds = this.loadDocsBuildsTask.lastSuccessful.value;
139-
if (docsBuilds.length > 0 && docsBuilds[0].build_status === true) {
139+
if (docsBuilds.length !== 0 && docsBuilds[0].build_status === true) {
140140
return `https://docs.rs/${this.crate.name}/${this.currentVersion.num}`;
141141
}
142142
}

mirage/route-handlers/summary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function summary(schema) {
99
let most_recently_downloaded = crates.sort((a, b) => b.recent_downloads - a.recent_downloads).slice(0, 10);
1010

1111
let num_crates = crates.length;
12-
// eslint-disable-next-line unicorn/no-reduce
12+
// eslint-disable-next-line unicorn/no-array-reduce
1313
let num_downloads = crates.models.reduce((sum, crate) => sum + crate.downloads, 0);
1414

1515
let popular_categories = schema.categories

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"eslint-plugin-ember-concurrency": "0.2.1",
112112
"eslint-plugin-import-helpers": "1.1.0",
113113
"eslint-plugin-prettier": "3.3.0",
114-
"eslint-plugin-unicorn": "24.0.0",
114+
"eslint-plugin-unicorn": "25.0.0",
115115
"loader.js": "4.7.0",
116116
"normalize.css": "8.0.1",
117117
"nyc": "15.1.0",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7390,10 +7390,10 @@ [email protected]:
73907390
dependencies:
73917391
prettier-linter-helpers "^1.0.0"
73927392

7393-
eslint-plugin-unicorn@24.0.0:
7394-
version "24.0.0"
7395-
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz#08017ccd7ac704777d459cff6e13a35f54cbcab1"
7396-
integrity sha512-NfLjIZas/ZUwc3S+pUtbTRqgCkODxPEkJBJ5ZR8wIu90BmX4jmXp10hoOZMScR2CR1NYTtrx0OX4BQvBnbzZzA==
7393+
eslint-plugin-unicorn@25.0.0:
7394+
version "25.0.0"
7395+
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.0.tgz#b5718381ac615f2bcf7814e4acf0aac78b11a10f"
7396+
integrity sha512-RuhPUrsKuRj0YGz8lMuh5Z5DJoC/hmUR6omvlquLlY6SYY+oZXMFyp83ckpqLMhbafqUx+JttWOPOjfP4W9Y+Q==
73977397
dependencies:
73987398
ci-info "^2.0.0"
73997399
clean-regexp "^1.0.0"

0 commit comments

Comments
 (0)