-
Notifications
You must be signed in to change notification settings - Fork 1
Update dependency eslint-plugin-unicorn to v19 #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR has been edited👷 This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description. |
@calebeby this update required a lint fix for this rule: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v19.0.0/docs/rules/prefer-set-has.md Would you mind reviewing the lint fix? |
@spaceninja the |
Can we disable no-fn-reference-in-iterator as well? That is a pattern that I like to use. In the docs for that rule it explains a scenario where that pattern has the potential to mess things up, but that seems very edge-case-y |
I agree with both suggestions from @calebeby. 😉 |
I wonder if we should disable This rule changes all arrays (that it can detect) to sets if you call .includes() on it. While it is true that array.includes is O(n) and set.has is O(1), the conversion from array to set has a cost as well, it is probably O(n). In the use case that was auto-fixed here it makes sense to use I think we should disable this rule and let the humans decide when to use set vs array. The decision is more nuanced than "if you call .includes on it, you should be using set instead of array" |
I think this is fair as well. Feels a bit heavy-handed of a change. 👍 |
LOLOLOL @calebeby nice |
+1 to all the changes proposed. |
@spaceninja I mean Sindre definitely has a lot of good points here but having a lint rule for this becomes really really annoying |
Seems like there was consensus here. If you need my opinion, I can try to provide one, but I trust you guys have considered it fully. EDIT: FWIW, I quickly scanned both references and agree on both decisions you've made. |
This PR contains the following updates:
^18.0.0
->^19.0.0
Release Notes
sindresorhus/eslint-plugin-unicorn
v19.0.1
Compare Source
no-fn-reference-in-iterator
: Ignorethis.
andVue.filter
(#699)b02a9c6
no-fn-reference-in-iterator
: Ignore cases obviously not a function reference (#697)dae5107
v19.0.0
Compare Source
New rules
no-null
rule (#636)c773c16
Breaking
string-content
: Make it have no default patterns (#637)08fad55
catch-error-name
: ReplacecaughtErrorsIgnorePattern
option with anignore
option (#661)5a27f04
Improvements
custom-error-definition
: Support class properties (#673)9cc8d60
catch-error-name
: SupportPromise#then
(#660)edcf73c
prefer-set-has
: Supports more types of array (#641)29f3c9c
Fixes
escape-case
: Fix missing characters (#678)d986427
no-nested-ternary
: Fix incorrect result with TypeScript parser (#664)cb08ed0
custom-error-definition
: Fix duplicated reports onthis.message
assign (#669)aa00647
custom-error-definition
: Fix crash on@typescript-eslint/parser
(#659)e8cb921
catch-error-name
: Improve error message (#665)8ac9a90
catch-error-name
: Fix error renaming (#654)cc2d1b1
catch-error-name
: Only allow_
when it's not used (#650)0c31a0b
catch-error-name
: Ignore destructuring (#649)b2838fd
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ 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.