Update dependency eslint-plugin-unicorn to v69 #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/eslint-plugin-unicorn-69.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
^65.0.0→^69.0.0Release Notes
sindresorhus/eslint-plugin-unicorn (eslint-plugin-unicorn)
v69.0.0Compare Source
New rules
consistent-tuple-labels(#3389)fb89880no-invalid-well-known-symbol-methods(#3433)a81ab49no-late-event-control(#3440)898d9c5prefer-abort-signal-timeout(#3441)5a59e19prefer-aggregate-error(#3436)e11cb92prefer-dom-node-replace-children(#3399)5c83834prefer-error-is-error(#3438)d50d876prefer-observer-apis(#3398)9c62a05prefer-promise-try(#3435)704d141prefer-set-methods(#3439)75c2bb3prefer-toggle-attribute(#3396)da04c21prefer-url-search-parameters(#3395)b410701Improvements
comment-content: Don't mutate commented-out multi-line code (#3413)bef80c8consistent-boolean-name: Addignoreoption and plural prefixes (#3423)7cc1d9econsistent-boolean-name: Don't crash on Svelte{#each}bindings (#3417)effc0e1consistent-conditional-object-spread: Treatundefined/nullfallback as an empty branch (#3401)38eebbdcustom-error-definition: Allow no-substitution template literal forname(#3383)594e050custom-error-definition: Don't requireoptionsparameter when forwarded tosuper()inline (#3377)e931467name-replacements: Exclude Vite type declaration (#3375)396c2edno-computed-property-existence-check: Allow dynamic access to a known boolean value (#3420)add50ffno-incorrect-template-string-interpolation: Ignore braces inside block comments (#3429)2676b5dno-nonstandard-builtin-properties: AllowstackonErrorinstances (#3416)b4a3527no-return-array-push: Allowvoidoperator to opt out (#3384)046dc75no-return-array-push: Don't report custompushmethods that don't return arrays (#3427)ed1b57eno-top-level-side-effects: Allow type-only exports (#3421)c896024no-unnecessary-boolean-comparison: Fix false positive for destructured parameters and yield expressions (#3392)26f37f8no-unnecessary-global-this: Don't report existence checks (#3426)668ec36no-unreadable-object-destructuring: Allow computed keys when a rest element is present (#3400)3d3b654no-unsafe-string-replacement: Ignore non-string receivers (#3442)05c7c25no-unused-array-method-return: Restrictvalues()reporting to arrays (#3434)9e12972no-useless-boolean-cast: KeepBoolean()around possibly-undefinedvalues (#3397)d35e538no-useless-concat: Skip concats that form a${…}placeholder (#3428)a39fe66no-useless-else: Autofixelsebodies containing JSX (#3419)3c17b69no-useless-iterator-to-array: Improve fixes (#3432)3bc8c69prefer-at: Only check positive string index access withcheckAllIndexAccess(#3415)68d0d25prefer-code-point: Don't suggest the swap when the result feeds arithmetic (#3430)9083ae7prefer-continue: Don't report when theifbody exits the loop (#3414)2187122prefer-minimal-ternary: AddcheckVaryingCalleeoption (#3381)c397f87v68.0.0Compare Source
Breaking
prevent-abbreviationsrule toname-replacements(#3362)af0158dAwesome
Now 300+ rules 🎉
New rules
consistent-conditional-object-spread(#3326)8aa1e0ddefault-export-style(#3364)0015e81no-accidental-bitwise-operator(#3318)af2661eno-array-concat-in-loop(#3350)4a1f65cno-array-front-mutation(#3323)d8302bdno-array-sort-for-min-max(#3351)e4b6666no-boolean-sort-comparator(#3368)3be859cno-chained-comparison(#3310)c29e211no-collection-bracket-access(#3286)6ccd694no-constant-zero-expression(#3311)134eea2no-double-comparison(#3329)ae4d7d7no-duplicate-if-branches(#3346)94b8c3bno-duplicate-logical-operands(#3348)af07fd8no-impossible-length-comparison(#3342)84dfd8bno-invalid-character-comparison(#3333)b2e9191no-loop-iterable-mutation(#3357)b961432no-misrefactored-assignment(#3315)063a798no-nonstandard-builtin-properties(#3337)14cc4dbno-selector-as-dom-name(#3328)6d9b14fno-unnecessary-boolean-comparison(#3349)00d90d4no-useless-compound-assignment(#3355)ddf347ano-useless-delete-check(#3359)2712e16no-useless-logical-operand(#3352)8689080no-xor-as-exponentiation(#3356)5b1952bprefer-array-from-async(#3370)b2bf08fprefer-array-iterable-methods(#3358)e32a7c3prefer-boolean-return(#3340)084bb9eprefer-continue(#3347)c374e14prefer-flat-math-min-max(#3341)3f0a2ceprefer-hoisting-branch-code(#3369)00d8a9bprefer-math-constants(#3309)6ee7dd8prefer-promise-with-resolvers(#3322)e880d29prefer-regexp-escape(#3367)dec6c31prefer-single-replace(#3353)9117778prefer-unary-minus(#3354)98c6f38prefer-url-can-parse(#3366)ba55624prefer-while-loop-condition(#3344)ce538b7Improvements
42abe7434ca8f6d7ce07eprefer-short-arrow-method: Remove fromrecommendedpreset (#3345)0cfd77aprefer-type-literal-last: Remove fromunopinionatedpreset and stop checking intersection types (#3320)447c665consistent-boolean-name: Do not check destructured bindings (#3324)fb0cfe0logical-assignment-operators: Do not assume the base rule'sdefaultOptionsexist (#3321)253e25flogical-assignment-operators: Improve error message (#3302)3ec8fecname-replacements: Add more default replacements (#3365)f968bf3new-for-builtins: Cover more builtins (#3361)e04ac43no-array-splice: Only report fresh, non-escaping local arrays (#3301)babb873no-break-in-nested-loop: Handle unlabeledcontinuein nestedswitchstatements (#3335)ca893bano-declarations-before-early-exit: Ignore initializers containingawaitoryield(#3303)6d98190no-incorrect-template-string-interpolation: Remove fromunopinionatedpreset and fix false-positive (#3319)39dc546no-manually-wrapped-comments: Ignore some more comments (#3292)a545dfeno-named-default: Don't drop comments in autofix (#3306)44e7361no-unsafe-property-key: Allow intrinsic string-mapping types as keys (#3343)ba6020fno-useless-coercion: Flag+value,value + '', andvalue.toString()idioms (#3338)23a52f6no-useless-undefined: Flagreturn undefinedforvoidreturn type (#3334)488d5e3prefer-array-find: Add.filter(…).slice(-1)support (#3360)b6ea1e2prefer-early-return: Fix lexical declaration autofixes (#3325)e7771bdprefer-identifier-import-export-specifiers: Check import attribute keys (#3287)fec43d2prefer-includes-over-repeated-comparisons: Ignore distinct expressions compared againstundefined(#3308)78858ecprefer-minimal-ternary: Report dynamic computed-key swaps (#3300)72879c4prefer-number-properties: AddparseFloatsupport (#3307)4b891d3prefer-object-iterable-methods: Preserve TypeScript casts on value access (#3327)d3a4d39v67.0.0Compare Source
New rules
consistent-boolean-name(#3237)8be0920logical-assignment-operators(#3246)7046694no-array-splice(#3235)d1143a9no-invalid-argument-count(#3243)ec091a9no-non-function-verb-prefix(#3242)5c32dd0no-top-level-assignment-in-function(#3234)e5ff667no-uncalled-method(#3231)f65ac01no-unreadable-for-of-expression(#3248)a8c7f89no-useless-coercion(#3283)3c76922no-useless-continue(#3276)5fd7d25no-useless-override(#3271)f503289operator-assignment(#3249)65ef58cprefer-array-slice(#3233)d9bce20prefer-else-if(#3232)98c2c2eprefer-has-check(#3250)a8d380dprefer-map-from-entries(#3255)01c0f82Improvements
no-unreadable-new-expression: Remove fromrecommendedpreset (#3285)c9f452ecomment-content: Remove fromrecommendedpreset (#3269)21cce8bcomment-content: AddcheckUniformCaseoption (#3269)21cce8bconsistent-class-member-order: Group static methods with other static members (#3239)8f4de02consistent-class-member-order: Improve error message (#3264)47f9f21dom-node-dataset: Flag.datasetassigned to a variable withpreferAttributes(#3268)79198ccno-array-reduce: SuggestMath.sumPrecise()for sum reduces (#3261)081936dno-return-array-push: Disallow usingpush()andunshift()return values (#3244)d9ea7abno-unreadable-array-destructuring: Disallow property targets (#3245)8b50359no-unreadable-object-destructuring: Disallow property targets (#3245)8b50359no-useless-fallback-in-spread: AddcheckTernaryoption (#3284)b2496fcprefer-logical-operator-over-ternary: Improve nullish ternary detection (#3240)4014a1eprefer-minimal-ternary: AddcheckComputedMemberAccessoption (#3241)cf4c014prefer-scoped-selector: Only apply to combined selectors (#3263)d715badprefer-scoped-selector: Report partially-scoped selector lists (#3259)cf88cddprefer-type-literal-last: Keepnullandundefinedlast (#3281)f6a9dceno-array-callback-reference: Harden the rule (#3230)dcc0cf8no-declarations-before-early-exit: Harden side-effect detection (#3238)1bad677no-declarations-before-early-exit: Ignore React hook calls (#3280)de47dcecomment-content: Skip non-prose comments (#3236)9c85b1fno-empty-file: Don't report non-empty files parsed by a plain-text parser (#3270)3b8b9a4no-unsafe-property-key: Don't flagunique symbolkeys (#3278)3fa567eno-unsafe-property-key: Ignore template literal types (#3247)b8d9602v66.0.0Compare Source
Breaking
93164fb93164fbno-array-for-eachrule tono-for-each(#3216)b87c8a9no-hex-escaperule (#3202)d68b09eprefer-unicode-code-point-escapes, which covers more cases.New rules
class-reference-in-static-methods(#3154)bbeb92fcomment-content(#3104)d14d0fdconsistent-class-member-order(#3226)d116a6bconsistent-export-decorator-position(#3175)9302e8dconsistent-function-style(#3137)a86fe5econsistent-optional-chaining(#3195)c07bf4eexplicit-timer-delay(#2814)29ae4ebid-match(#3109)d39bfa3max-nested-calls(#3183)0763b75no-asterisk-prefix-in-documentation-comments(#3191)4a95ff6no-break-in-nested-loop(#3148)41648c1no-computed-property-existence-check(#3151)af0e3c4no-confusing-array-with(#3178)95a748bno-declarations-before-early-exit(#3139)f7241c8no-duplicate-loops(#3142)745e9edno-error-property-assignment(#3114)bf9d72eno-global-object-property-assignment(#3136)b03927eno-incorrect-template-string-interpolation(#3162)32380f9no-mismatched-map-key(#3192)154049fno-negated-array-predicate(#3203)6ba7506no-negated-comparison(#3149)5733173no-object-methods-with-collections(#3194)c9ffbf9no-optional-chaining-on-undeclared-variable(#3223)74be15eno-redundant-comparison(#3068)115837dno-return-array-push(#3098)b8735b0no-subtraction-comparison(#3123)178184bno-top-level-side-effects(#3184)442fba3no-undeclared-class-members(#3153)93cbfc0no-unnecessary-global-this(#3161)a9e2c65no-unnecessary-splice(#3124)646ad09no-unreadable-new-expression(#3113)6ae57a9no-unreadable-object-destructuring(#3160)1696abdno-unsafe-buffer-conversion(#3174)a85f2c6no-unsafe-dom-html(#3218)c70380ano-unsafe-property-key(#3227)d1b6ba7no-unsafe-string-replacement(#3120)e097996no-useless-boolean-cast(#3097)b55d2f8no-useless-concat(#3146)5a88edeno-useless-else(#3152)a99a914no-useless-recursion(#3150)d7ecd39no-useless-template-literals(#3225)b752111prefer-add-event-listener-options(#3169)347abffprefer-array-from-map(#3158)584d39dprefer-await(#3147)15632b6prefer-direct-iteration(#3107)0e2fcfdprefer-dispose(#3085)ce29c25prefer-dom-node-html-methods(#3119)1887853prefer-early-return(#3131)eaca182prefer-global-number-constants(#3127)3c7c767prefer-identifier-import-export-specifiers(#3134)b222909prefer-iterable-in-constructor(#3129)5d76a2dprefer-iterator-to-array(#3094)21eb45bprefer-location-assign(#3132)a064465prefer-minimal-ternary(#3222)9c952e0prefer-number-coercion(#3105)2e6696dprefer-number-is-safe-integer(#3073)55d9f7eprefer-object-define-properties(#3189)ced7bcdprefer-object-destructuring-defaults(#3210)d52f71bprefer-object-iterable-methods(#3156)825fbc0prefer-path2d(#3187)a131574prefer-private-class-fields(#3116)4b2273eprefer-scoped-selector(#3099)2c6eca5prefer-short-arrow-method(#3118)745cd27prefer-simple-sort-comparator(#3081)72d12e5prefer-single-array-predicate(#3164)cd42516prefer-single-object-destructuring(#3163)c08a8fbprefer-smaller-scope(#3206)4374b0eprefer-temporal(#3075)74c55afprefer-type-literal-last(#3121)9967938prefer-uint8array-base64(#3086)254e2e0prefer-unicode-code-point-escapes(#3202)d68b09eprefer-url-href(#3186)790bbfdrequire-array-sort-compare(#3166)ed51c89require-proxy-trap-boolean-return(#3159)54ccecbImprovements
1c85dd16b2de0a3cb9d4bd698a60fec53a552c1774consistent-compound-words: AllownewLineword (#3117)949e56bconsistent-compound-words: Improve performance (#3185)fc4e29aconsistent-destructuring: Stop expanding destructuring (#3115)65afb79consistent-function-scoping: Track JSX references (#3101)e0130c2expiring-todo-comments: Addpeer:condition (#3088)93e9a0cexpiring-todo-comments: Simplify report messages (#3215)d0945e0explicit-length-check: Detectlength <= 0as a zero-length check (#3071)ea471f1filename-case: AddcamelCaseWithAcronymscase (#3168)1a7126efilename-case: Allow acronyms in pascal case (#3125)b70cb64import-style: Supportnode:builtins (#3207)abf805fno-empty-file: Support all file extensions (#3077)c4fa5b1no-for-each: Improve autofix reliability (#3213)0116e32no-for-loop: Support cached length loops (#3190)c3f79c8no-invalid-argument-count: Handle TypeScript wrappers (#3179)2639a3bno-invalid-file-input-accept: Normalize legacy MIME types (#3093)27104c0no-single-promise-in-promise-methods: AutofixPromise.allfirst element (#3112)50b5658no-unnecessary-polyfills: Respect Browserslist config (#3122)8b3660ano-unused-properties: Support inline TypeScript object type literals (#3204)ec77d4eno-useless-fallback-in-spread: Support ternary (#3083)0b6c452no-useless-spread: Check object spread inObject.assign()(#3188)c8f2bf5no-useless-switch-case: Allowcase nullandcase undefinedin TypeScript files beforedefault(#3128)556b6a9no-useless-undefined: Handle guarded indexed access (#3201)4cd318dprefer-array-flat: Stop reporting plainconcatnormalization (#3106)b4e5ce2prefer-array-flat-map: Support.filter(…).flatMap(…)(#3199)a14375bprefer-array-from-map: Supportfor-ofarray mapping (#3220)174d5a5prefer-at: Check single-character substring (#3100)6a33b04prefer-at: Preferat()for string indexing (#3200)2ac7dd1prefer-early-return: Add autofix (#3212)0f0ac96prefer-includes: Simplify boolean array predicates (#3096)950e137prefer-math-trunc: CheckparseInt(#3108)c9632b9prefer-modern-dom-apis: Handle.replaceChildren()(#3170)27daf8eprefer-number-is-safe-integer: Check legacy integer patterns (#3214)4e50131prefer-number-properties: Auto-fixisNaN/isFinitewhen the argument is a number (#3082)5e27e8fprefer-object-from-entries: Check for-of loops (#3221)2123d95prefer-regexp-test: Improve TypeScript support (#3193)a8338abprefer-regexp-test: SupportString#search()checks (#3089)7cef013prefer-spread: Handle trivialfor...ofcopies (#3196)dd6e4a1prefer-spread: Improveconcat()array detection (#3171)0f6dc8aprefer-spread: Stop checkingString#split('')(#3110)a4009b1prefer-string-replace-all: Allow more regex flags for string fixes (#3180)19580d8prefer-string-starts-ends-with: DetectindexOf() === 0(#3087)92b6d79prefer-ternary: Detectletdeclaration withifreassignment (#3084)7c7e724prefer-ternary: Only report captured values (#3181)6df473astring-content: Ignoresqltagged templates (#3143)3796576switch-case-braces: Supportsingle-statementoption (#3182)f897537Fixes
better-dom-traversing: Ignoreprops.children(#3177)486d9b7consistent-function-scoping: Fix loop capture false positives (#3157)522e188custom-error-definition: PreserveError#cause(#3092)f182d63max-nested-calls: Ignore JSX wrappers (#3209)1e273ddno-array-callback-reference: Ignore non-array TypeScript receivers (#3130)64dfda9no-array-method-this-argument: Fix false positives (#3219)9aeec5eno-for-loop: Guard unsafe.entries()autofixes (#3211)d5f8a89no-useless-spread: Reduce false positives (#3167)2c19771no-useless-undefined: Ignore TypeScript call arguments (#3095)51a7fd6prefer-array-some: Ignore non-array find checks (#3208)5d9dae2prefer-at: Ignore DOM collection receivers (#3102)4db8f05prefer-global-this: Don't flagtypeofexistence checks (#3070)2767382prefer-https: Ignore well-known XML namespace URIs (#3076)40df180prefer-native-coercion-functions: Ignore type predicates (#3144)d86a467prefer-switch: Ignore literal discriminants (#3103)512a534prefer-type-error: Don't flagtypeof x === 'undefined'existence checks (#3067)3676ba1prevent-abbreviations: Ignoree2eanda11y(#3069)febc992switch-case-braces: Fix incorrect autofix with comment (#3172)9368d98Configuration
📅 Schedule: (UTC)
🚦 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 Mend Renovate.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: package-lock.json
0e791702deadf1142519View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.