-
-
Notifications
You must be signed in to change notification settings - Fork 1
⬆️ Updates eslint-plugin-unicorn to v62 #1076
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks for the PR! This section of the codebase is owner by https://github.com/AlexRogalskiy/ - if they write a comment saying "LGTM" then it will be merged. |
|
Thanks for opening an issue! Make sure you've followed CONTRIBUTING.md. |
Hello from PR HelperIs your PR ready for review and processing? Mark the PR ready by including If you still have work to do, even after marking this ready. Put the PR on hold by including |
This PR contains the following updates:
^17.2.0->^62.0.0Release Notes
sindresorhus/eslint-plugin-unicorn (eslint-plugin-unicorn)
v62.0.0Compare Source
New rules
no-immediate-mutation(#2787)e1c7d2eno-useless-collection-argument(#2777)2d07c9aprefer-response-static-json(#2778)ffe5943Improvements
text-encoding-identifier-case: AddwithDashoption (#2780)9025386no-useless-undefined: Check oneundefinedat a time (#2792)27f7509prefer-single-call: Check optional chaining (#2788)8a132actext-encoding-identifier-case: Enforce'utf-8'inform[acceptCharset]andTextDecoder(#2785)46b3974prefer-node-protocol: Handle TypeScript import types (#2774)13a37a0no-array-for-each: IgnoreforEachfor Effect library (#2783)2ef6f83prefer-string-raw: Ignore more places that requires a string (#2776)43bc429prefer-string-raw: Add support for template literals (#2691)52723a2prefer-global-this: AddnavigationtowindowSpecificAPIs(#2770)0c93998prefer-code-point: Report cases whereString.fromCharCodeis not called directly (#2766)1d682a1no-useless-spread: Safely remove empty array and object (#2764)7aeababFixes
consistent-function-scoping: Fix inconsistent behavior (#2748)a546444v61.0.2Compare Source
throw-new-error: Fix false positive for Effect library (#2740)0ddf5eano-useless-undefined: IgnoreSet#delete(undefined)(#2739)99acd27prefer-includesandprefer-array-index-of: Prevent crash on Vue files (#2645)a1da518v61.0.1Compare Source
prefer-classlist-toggle: OmitElement#classList.contains()call when fixing (#2732)066f96bv61.0.0Compare Source
New rules
prefer-bigint-literals(#2722)1f4cb8aprefer-classlist-toggle(#2731)5f27ec2require-module-attributes(#2725)5f275e2no-array-sort(#2713)b70d1e8Improvements
unopinionatedconfig (#2715)c13d09b60b2ec5no-array-reduce: Report optional chaining and calling of.reduce()(#2721)caa1f8bprefer-type-error: Ignore error type check (#2729)d12fc01Fixes
prefer-includes: Fix compatibility with Vue SFC (#2704)540a4d4v60.0.0Compare Source
Breaking
2dc27d9New rules
prefer-class-fields(#2512)4c82dc1no-array-reverse(#2677)b051302require-module-specifiers(#2686)2a8e152no-useless-error-capture-stack-trace(#2676)fc900b6Improvements
prefer-string-replace-all: Preserve escape (#2667)2310b50SuppressedError(#2669)f51aeb9Fixes
no-array-callback-reference: Fix optional chaining expressions being ignored (#2694)ad27922no-unnecessary-await: Fix handling of experimental pipeline operator (#2658)2b8ebe5v59.0.1Compare Source
prefer-single-call: Fix crash onCallExpressionfollowed byFunctionDeclaration(#2639)3114dd9v59.0.0Compare Source
Breaking
no-array-push-pushrule toprefer-single-call(#2617)e117783no-length-as-slice-endrule tono-unnecessary-slice-end(#2614)1922df1New rules
prefer-import-meta-properties(#2607)1f6e172no-unnecessary-array-flat-depth(#2618)c63e698no-unnecessary-array-splice-count(#2614)1922df1Improvements
Float16Array(#2622)9e50568prefer-node-protocol: Supportprocess.getBuiltinModule()(#2611)056364dno-unnecessary-slice-end: Support checkingInfinity(#2614)1922df1v58.0.0Compare Source
Potentially breaking
engines.nodein package.json to match real compatibility (#2581)e48a620Improvements
escape-case: Add case option (#2559)0f6048cnumber-literal-case: AddhexadecimalValueoption (#2559)0f6048cprevent-abbreviations: PreserveiOS(#2560)e8798daFixes
no-unnecessary-polyfills: Fix browserslist field name (#2603)1a4c76fno-unnecessary-polyfills: Fix crash on checkinges6-errormodule (#2582)66de41ano-accessor-recursion: Fix exception when used in CommonJS (#2574)ca1e432v57.0.0Compare Source
Breaking
c44ea26c44ea26New rules
consistent-date-clone(#2544)8cebcf4no-named-default(#2538)ed8da1bconsistent-assert(#2535)f3fc973no-instanceof-builtins819757441548c4no-accessor-recursion(#2525)92b5671Improvements
no-instanceof-array(#2534)c9c056cno-instanceof-builtinswhich covers more cases.prefer-includes: Support Vue template (#2526)4e539b4prevent-abbreviations: Addutilandutilsto abbreviations (#2507)5ba9f0aprefer-math-min-max: Ignore BigInt (#2467)8b7c5fcprefer-global-this: Also excludeouterWidthandouterHeight(#2549)8f00f76prefer-at: Remove unsafe autofix for.slicewith 1 argument (#2476)2985eccprefer-math-min-max: Reduce false positives in TypeScript (#2527)1cbc561prefer-string-raw: IgnoreImportAttribute(#2551)d963ccdFixes
new-for-builtins: Correct fix forDate()(#2543)e5e17f8prefer-global-this: Fix auto-fix fortypeof window(#2501)b95dc12v56.0.1Compare Source
expiring-todo-comments: Fix compatibility with ESLint 9.15 (#2497)16b09d3v56.0.0Compare Source
New rules
prefer-global-this(#2410)1558cbeprefer-math-min-max(#2432)7369077consistent-existence-index-check(#2425)d3e4b80Breaking
better-regexfrom recommended rules (#2443)461b01cImprovements
no-useless-undefined: Ignore React 19useRefcalls (#2463)5f744e8prefer-query-selector: Add support forgetElementsByName(#2398)e511ffdprefer-string-slice: Remove unsafe autofix forString#substr()(#2427)891842dno-for-loop: Remove invalid fix for TypeScript (#2426)1e367bbv55.0.0Compare Source
New rules
no-length-as-slice-end(#2400)3c33820Improvements
68e0f13Fixes
no-single-promise-in-promise-methods: Remove broken autofix forPromise.all()(#2386)8d28b6eprefer-node-protocol: Ignore Bun modules (#2384)a45b24ano-negation-in-equality-check: Ignore boolean type casting (#2379)37e00ddv54.0.0Compare Source
New rules
no-negation-in-equality-check(#2353)8957a03Breaking
prefer-array-find: ChangecheckFromLastdefault value totrue(#2367)a449af9Improvements
ac8536eprefer-array-some: CheckArray#{findIndex,findLastIndex}()(#2370)10568abprefer-includes: Check.lastIndexOf()(#2368)d812ad1prefer-string-raw: Ignore strings in Enums (#2354)175ea04Fixes
newto calls (#2352)d8f8161v53.0.0Compare Source
New rules
consistent-empty-array-spread(#2349)8d7954cprefer-string-raw(#2339)4f1400ano-invalid-fetch-options(#2338)342aafbno-magic-array-flat-depth(#2335)bc17428prefer-structured-clone(#2329)497519eBreaking
598f57bMeta
b82542dImprovements
598f57bno-array-method-this-argument: CheckArray.fromAsync()(#2330)99489b9prefer-number-properties: AddcheckNaNoption (#2315)d30de50template-indent: Support member expression paths intagsandfunctions(#2346)aabcf1dprefer-number-properties: Don't require by default forInfinity/-Infinityto be written asNumber.POSITIVE_INFINITY/Number.NEGATIVE_INFINITY(#2312)e0dfed2escape-case: IgnoreString.raw(#2342)45bd444no-hex-escape: IgnoreString.raw(#2343)cc02a7fprefer-dom-node-dataset: IgnoreawaitedgetAttributecall (#2334)45f23d5prevent-abbreviations: Support non-ASCII filenames (#2308)28762c8throw-new-error: Check all call expressions instead of just argument ofThrowStatement(#2332)1626852v52.0.0Compare Source
New rules
no-single-promise-in-promise-methods(#2258)8f0ee89no-await-in-promise-methods(#2259)a3be554no-anonymous-default-export(#2273)c035216Improvements
filename-case: Add option for multiple file extensions (#2186)4594020import-style: Supportnode:protocol (#2297)c28a086prefer-array-find: Checkarray.filter().at(0)(#2284)e6074feprefer-prototype-methods: CheckObject.prototypemethods fromglobalThis(#2286)1792d33no-array-callback-reference: Check logical expressions and check ternaries deeply (#2289)231529aFixes
prefer-spread: Fix it to not report on optional chaining (#2304)df1ff1cno-anonymous-default-export: Uppercase class name (#2282)5ce4169v51.0.1Compare Source
prefer-node-protocol: Fix false positive onbun:*modules (#2272)43fc638v51.0.0Compare Source
Breaking
consistent-destructuring: Remove fromrecommendedpreset (#2260)702d51bImprovements
no-array-method-this-argument: CheckArray.from()(#2262)797caeeFixes
no-thenable: Fix crash on{[Symbol.prototype]: 0}(#2248)3c7d7c0prefer-prototype-methods: Fix argument ofisMethodCall(#2247)3b504fav50.0.1Compare Source
Fixes
no-unnecessary-polyfills: Fix missing dependency error (#2242)3df1606v50.0.0Compare Source
New rules
no-unnecessary-polyfills(#1717)6788d86Improvements
65711f9no-useless-undefined: AddcheckArrowFunctionBodyoption (#2232)9d7048cprefer-negative-index: CheckTypedArray#subarray()(#2237)6708a30no-useless-undefined: Ignore React state setters (#2223)42881baprefer-module: Allowmoduleas TSTypeParameter name (#2213)8f61f7cFixes
string-content: Fix JSX autofix for newlines, etc. (#2222)b95e75ev49.0.0Compare Source
Improvements
expiring-todo-comments: Support monorepos (#2159)ac51d40prefer-module: Allowmoduleas TSIndexSignature names or TSTypeAliasDeclaration ids (#2209)ea94b3bvflag (#2195)28e7498prefer-event-target: IgnoreEventEmitterfrom@angular/coreandeventemitter3(#2197)1629ebev48.0.1Compare Source
no-empty-file: Fix directive check for TypeScript parser (#2180)1bb9ce8v48.0.0Compare Source
Improvements
no-unsafe-regexrule (#2135)7b473aaprefer-top-level-await: Ignore promises insidePromise.{all,allSettled,any,race}()(#2139)d3f6b60no-process-exit: Ignore when usingnode:worker_threadsmodule (#2136)2907805prefer-array-some: Ignore filter calls with literal argument (#2097)7a32edbprefer-modern-math-api: Check cases thatMath.hypot()should be preferred (#2080)9bbc948explicit-length-check: Ignore.length || number(#1977)b9b8794Fixes
f10f1a6prefer-dom-node-dataset: Fix edge cases (#2171)b2d7378prefer-dom-node-dataset: Remove broken fix forelement.setAttribute(#2169)61234afno-lonely-if: Fix an edge case (#2168)ca837a8no-useless-undefined: Turn parameter withundefineddefault value into optional parameter (#2138)4aa7d60no-thenable: FixObject.fromEntries()check (#2130)f3265b9prefer-dom-node-remove: Fix incorrect auto-fix (#2084)74bb36dv47.0.0Compare Source
Breaking
a3bc120eslint@>=8.38.0(#2066)04af765prefer-at,prefer-event-target, andprefer-string-replace-allin recommended config (#2073)a3bc120New rules
prefer-blob-reading-methods(#2065)2bb1a04Improvements
prefer-top-level-await: Ignore.cjsfiles (#2072)0c3ccb1prefer-spread: Stop checkingArray.fromcall with map function (#2064)f5beccbprefer-dom-node-text-content: Check optional chaining (#2062)8d6d007prefer-dom-node-{append,remove}: Check optional chaining (#2061)443999bFixes
prefer-number-properties: Fix false positives (#2050)124bfa7v46.0.1Compare Source
expiring-todo-comments(#2077)7a6861av46.0.0Compare Source
Improvements
elemsto abbreviations (#2040)2a9c840no-useless-spread: CheckArray#{toReversed,toSorted,toSpliced,with}(#2030)55469e5prefer-set-has: SupportArray#{toReversed,toSorted,toSpliced,with}(#2032)fea5b42prefer-spread: Forbid use ofArray#toSpliced()to copy array (#2034)4ada50eprefer-negative-index: Check.toSpliced()and.with()(#2031)7ed738ano-empty-file: Support.jsxand.tsxextensions (#2002)ba1a00eFixes
expiring-todo-comments: Do not normalize package.json (#1871) (#2020)fcd8934v45.0.2Compare Source
prefer-string-replace-all: Don't crash on invalid pattern (#2011)3bbe027prevent-abbreviations: Skip fix for variables used in Vue template (#2012)8cd1dedv45.0.1Compare Source
no-useless-spread: Remove unsafe fix (#1996)6756cbdv45.0.0Compare Source
New rules
no-typeof-undefined(#1966)d7f7341no-negated-condition(#1963)e4aaa42prefer-set-size(#1952)5f23c98Improvements
prefer-at: Support private fields (#1929)60bb455no-useless-undefined: IgnoreArray#includes()andSet#has()(#1951)8dfd5a7no-useless-spread: Check cloning inline arrays (#1980)5d90d73prefer-top-level-await: Ignore expressions in class (#1976)b90a3aaprefer-string-replace-all: Improve RegExp to string fix (#1971)b844dbcprefer-string-replace-all: Check pattern even if it's already using.replaceAll(#1981)e8c5156prefer-string-replace-all: Report allString#replace()when the pattern hasgflag (#1965)6316f05prefer-string-replace-all: Ignore regex with pipe (#1962)76deaa3prefer-regexp-test: Use suggestions if not sure regexp withoutgflag (#1954)505a203no-array-for-each: Skip fix for some edge cases (#1979)48efc7aprefer-add-event-listener: Only fixExpressionStatement, checkoperator(#1955)aca21f2prevent-abbreviations: Improve fix forretVal(#1953)25cd810Fixes
prefer-top-level-await: Fix crash onfor..ofloop (#1950)00a29c8v44.0.2[Compare Source](https://redirect.github.com/sindresorhus/eslint-plugin
Configuration
📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone Europe/Moscow, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.