Releases: sindresorhus/eslint-plugin-unicorn
Releases Β· sindresorhus/eslint-plugin-unicorn
v62.0.0
New rules
no-immediate-mutation(#2787) e1c7d2eno-useless-collection-argument(#2777) 2d07c9aprefer-response-static-json(#2778) ffe5943
Improvements
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) 7aeabab
Fixes
v61.0.2
v61.0.1
v61.0.0
New rules
prefer-bigint-literals(#2722) 1f4cb8aprefer-classlist-toggle(#2731) 5f27ec2require-module-attributes(#2725) 5f275e2no-array-sort(#2713) b70d1e8
Improvements
- Add
unopinionatedconfig (#2715) c13d09b - Improve compatibility with optional chaining (#2727) 60b2ec5
no-array-reduce: Report optional chaining and calling of.reduce()(#2721) caa1f8bprefer-type-error: Ignore error type check (#2729) d12fc01
Fixes
v60.0.0
Breaking
New rules
prefer-class-fields(#2512) 4c82dc1no-array-reverse(#2677) b051302require-module-specifiers(#2686) 2a8e152no-useless-error-capture-stack-trace(#2676) fc900b6
Improvements
Fixes
no-array-callback-reference: Fix optional chaining expressions being ignored (#2694) ad27922no-unnecessary-await: Fix handling of experimental pipeline operator (#2658) 2b8ebe5
v59.0.1
v59.0.0
Breaking
- Rename
no-array-push-pushrule toprefer-single-call(#2617) e117783 - Rename
no-length-as-slice-endrule tono-unnecessary-slice-end(#2614) 1922df1
New rules
- Add
prefer-import-meta-properties(#2607) 1f6e172 - Add
no-unnecessary-array-flat-depth(#2618) c63e698 - Add
no-unnecessary-array-splice-count(#2614) 1922df1
Improvements
- Support
Float16Array(#2622) 9e50568 prefer-node-protocol: Supportprocess.getBuiltinModule()(#2611) 056364dno-unnecessary-slice-end: Support checkingInfinity(#2614) 1922df1
v58.0.0
Potentially breaking
Improvements
escape-case: Add case option (#2559) 0f6048cnumber-literal-case: AddhexadecimalValueoption (#2559) 0f6048cprevent-abbreviations: PreserveiOS(#2560) e8798da
Fixes
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) ca1e432
v57.0.0
Breaking
- This package is now pure ESM. Please read this.
- Flat config is now required c44ea26
- ESLint 9.20.0 or later is required c44ea26
New rules
consistent-date-clone(#2544) 8cebcf4no-named-default(#2538) ed8da1bconsistent-assert(#2535) f3fc973no-instanceof-builtins8197574 41548c4no-accessor-recursion(#2525) 92b5671
Improvements
- Deprecate
no-instanceof-array(#2534) c9c056c- Replaced by
no-instanceof-builtinswhich covers more cases.
- Replaced by
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) d963ccd
Fixes
new-for-builtins: Correct fix forDate()(#2543) e5e17f8prefer-global-this: Fix auto-fix fortypeof window(#2501) b95dc12