NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3627 most downloaded on npm
More than 300 powerful ESLint rules
Last release today
16 Sep 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
131 releases · first in 2016
`prefer-object-from-entries` (#1308) 4a14187
prefer-object-from-entries (#1308) 4a14187no-useless-length-check (#1398) 1107455no-useless-spread (#1401) 1463f52explicit-length-check: Remove greater-than-or-equal option (#1397) db1a2b5
no-array-reduce: Add allowSimpleOperations option (#1418) 153eb2cno-array-callback-reference: Ignore jQuery methods (#1457) 7af9a6fprevent-abbreviations: Ignore i18n and l10n (#1445) efdd90eno-array-callback-reference: Ignore mobx-state-tree usage (#1455) 73c0dfdnew-for-builtins: Check WeakRef and FinalizationRegistry (#1450) fce9d1dno-zero-fractions: Handle .0 correctly (#1444) fcca35dnew-for-builtins: Enforce new for SharedArrayBuffer and Proxy (#1438) 2ba83adno-null: Allow Object.create(null, …) (#1432) 768f301number-literal-case: Support Vue SFC (#1434) ee9f609no-object-as-default-parameter: Forbid destructuring (#1433) 3fcc4bbprefer-spread: Better auto-fix (#1426) 7bdf0ddprefer-array-some: Check cases comparing .find() with undefined (#1422) 3dc2f77no-useless-spread: Check useless "iterable to array" (#1414) 61bc6a3prefer-dom-node-text-content: Check destructuring, Use suggestion instead of auto-fix (#1417) c4bfc42require-post-message-target-origin: Disable for TypeScript files (#1415) 741484aprefer-add-event-listener: Update event types list (#1412) 7f88b2fno-instanceof-array: Support Vue SFC (#1410) 3b22917prevent-abbreviations: Add def (#1402) f783472no-instanceof-array: Improve report location (#1389) 6512fbdthrow-new-error: Fix an edge case (#1390) 806831bhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v34.0.1...v35.0.0
One column per quarter.
no-array-method-this-argument: Fix false positives (#1386) d364d67
no-array-method-this-argument: Fix false positives (#1386) d364d67https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v34.0.0...v34.0.1
`no-array-method-this-argument` (#1357) 96587f2
no-array-method-this-argument (#1357) 96587f2require-post-message-target-origin (#1326) 03c540bprefer-top-level-await (#1325) 05722a1
prefer-at (#1331) 8ca5b46
prefer-module: Ignore .cjs files (#1355) ebdc3c2error-message: Support AggregateError (#1351) e7b4300filename-case: Enforce lowercased file extension (#1336) 119615bexpiring-todo-comments: More helpful error when no conditions (#1375) 914a996prefer-array-some and prefer-regexp-test: Support Vue SFC (#1364) a46050eexplicit-length-check: Support v-show directive (#1363) f163c4aexplicit-length-check: Support Vue SFC files (#1360) 9199611prefer-type-error: Improve report location (#1354) bc3d58bno-useless-undefined: Ignore Set#add() Map#set() Array#{push,unshift}() (#1353) c6359c3prefer-prototype-methods: Only check methods from [] and {} (#1347) 29a4e75prefer-array-some: Report non-zero check on array.filter().length (#1337) f8aaac2context.getPhysicalFilename() (#1344) e2540cbprefer-array-find and prefer-at: Fix crash on LHS zero index access (#1373) da1f6d8prefer-prototype-methods: Fix a missing condition on object literal check (#1332) cec7f11https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v33.0.1...v34.0.0
prefer-prototype-methods: Ignore known object literal methods (#1330) 639e7af
prefer-prototype-methods: Ignore known object literal methods (#1330) 639e7afhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v33.0.0...v33.0.1
`require-array-join-separator` (#1284) 36e7103
require-array-join-separator (#1284) 36e7103require-number-to-fixed-digits-argument (#1288) 4a30863prefer-prototype-methods (#1247) 7bde733prefer-object-has-own (#1322) ca34b40
recommended preset.no-array-for-each: Handle only return statement inside if or else (#1319) 298a104new-for-builtins & no-new-buffer: Handle line breaks after new keyword (#1301) d37439fprefer-array-flat-map: Remove check on [].concat(...array.map(…)) (#1299) 128b5aaprefer-spread: Ignore {arrayBuffer,blob,buffer,file,this}.slice() (#1287) e18d5f2prefer-string-starts-ends-with: Add suggestions for safely handling non-strings (#1277) f14a9d1explicit-length-check: Ignore this.{size,length} (#1289) ed85d00prefer-string-starts-ends-with-rule: Don't autofix known non-string values (#1281) a1c8984explicit-length-check: Ignore known, non-number length properties (#1264) 42f6487empty-brace-spaces: Support experimental syntax (#1276) fa68b6fprefer-dom-node-remove: Improve parentheses handling (#1254) 74e4d39prefer-array-flat: Fix incorrect fix, check Array.prototype.concat.call (#1317) f6a939chttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v32.0.1...v33.0.0
prevent-abbreviations: Fix shorthand import/export detection (#1252) 4367479
prevent-abbreviations: Fix shorthand import/export detection (#1252) 4367479https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v32.0.0...v32.0.1
Drop support for Node.js v10 (#1211) a8e9f26
babel-eslint (#1211) a8e9f26
You should migrate to @babel/eslint-parserno-document-cookie (#1244) 866c4a3numeric-separators-style - Was previously disabled.prefer-array-flat - Was previously disabled.prefer-array-flat-map - Was previously disabled.no-for-loop: Ignore known non-array loop variables (#1242) 29f6b45prefer-array-find: Singularize variable name in autofix (#1243) 6b340a3prefer-switch: Do not add braces to the default case (#1235) c241782no-zero-fractions: Handle numeric separators, fix missing parentheses, improve report location (#1238) 2724afano-array-for-each: Better error message (#1239) 2e82dc8prefer-switch: Avoid conflict with no-unreachable rule (#1234) 1c78d0cprefer-optional-catch-binding: Support checking destructured errors (#1229) a0b2f4fno-array-for-each: Support autofixing complicated parameters (#1228) d84143fprefer-negative-index: Support Array#at() (#1217) 6443ee3explicit-length-check: Check Set#size (#1226) 6a745a0filename-case: Improve report position (#1227) 3d4ac1bprevent-abbreviations: Fix shorthand import/export detection (#1215) a669e31https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v31.0.0...v32.0.0
`prefer-node-protocol` (#1203) b1a5f53
prefer-node-protocol (#1203) b1a5f53prefer-module (#1141) a7e393chttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v30.0.0...v31.0.0
`prefer-switch` (#1181) 10e7a0c
prefer-switch (#1181) 10e7a0cprevent-abbreviations: Rename options (#1164) cf42cc5no-keyword-prefix: Rename blacklist option to disallowedPrefixes (#1180) 91e60d0no-array-push-push: Add ignore option (#1168) f9262d9prefer-spread: Report array.slice(0) (#1182) 92bebe1no-useless-undefined: Handle parenthesized undefined (#1178) c88882eno-array-for-each: Improve fixable parameter detection (#1177) 18d1ac2prefer-array-flat-map: Exclude React.Children.map().flat() (#1159) 3e6b6fbbetter-regex: Report parsing errors (#1133) 51ee030filename-case: Uniquify suggestion filenames (#1160) a87238fPropertyDefinition (#1127) 75c4d78prefer-number-properties: Fix some edge cases (#1170) e7e25b8prefer-number-properties: Fix some edge cases (part 2) (#1176) 3a58802prefer-regexp-test: Do not fix if regexp has g flag (#1173) 8d97bebno-array-for-each: Do not fix if callback parameter has type annotation (#1167) 0d4fc8bno-useless-undefined: Do not report return undefined if function has returnType (#1165) 4ff39e0prefer-set-has: Use suggestions if node has type annotation (#1158) 1221185no-null: Exclude second argument of Node.insertBefore() (#1157) b16c316prefer-add-event-listener: Fix crash on parenthesized cases (#1153) c95e854MemberExpression check when using ecmaVersion: 2019 (#1151) 56d5d9aprefer-regexp-test: Do not fix if argument of String#match() is known not RegExp (#1152) 0abc394https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v29.0.0...v30.0.0
`no-static-only-class` (#1120) f3b2441
no-static-only-class (#1120) f3b2441prefer-array-flat (#1126) 2397d94no-array-for-each: Use let if parameters are reassigned (#1139) a13ad3cno-array-push-push and prefer-ternary: Improve same reference detection (#1123) c2c28a6prefer-spread: Add Array#slice() check (#1117) 8bdb52dhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.2...v29.0.0
prevent-abbreviations: Do not rename exported types when using @babel/eslint-parser (#1104) 9a91a3d
prevent-abbreviations: Do not rename exported types when using @babel/eslint-parser (#1104) 9a91a3dprevent-abbreviations: Do not rename exported TypeScript types (#1103) 5c08932https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.1...v28.0.2
Fix missing eslint-visitor-keys dependency (#1100) 5c1ff2e
eslint-visitor-keys dependency (#1100) 5c1ff2ehttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.0...v28.0.1
no-lonely-if: Keep all comments (#1047) da94ca9
no-lonely-if: Keep all comments (#1047) da94ca9prefer-includes: Add Array#some() check (#1097) ee3a2e5prefer-includes: Improve report location (#1061) 83575a8prefer-spread: Improve auto-fix (#1080) e54dc66prefer-spread: Add more suggestions for .concat fix (#1054) 673c440no-unreadable-array-destructuring: Fix crash on destructuring in for…of loop (#1076) 11ce1bcno-array-for-each: Ignore React.Children.forEach (#1088) 5a931ddprefer-string-slice: Keep optional chaining in autofix (#1085) acaf197prefer-spread: Ignore Buffer.concat() (#1069) da685f7catch-error-name and prefer-set-has (#1077) 79a64b1prefer-default-parameters: Fix non-iterable visitorKeys (#1013) d707e83consistent-destructuring: Add ExperimentalRestProperty check (#1060) aca2ec5https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v27.0.0...v28.0.0
`no-array-for-each` (#1017) 719cd00
no-array-for-each (#1017) 719cd00no-array-push-push (#1015) 21537d7no-this-assignment (#1018) 62a2f92prefer-ternary: Add only-single-line option (#1025) 306c9e7numeric-separators-style: Add onlyIfContainsSeparator option (#916) 8d32574prefer-spread: Prefer ... over Array#concat() (#1029) cda72bdprefer-spread: Fix more .concat cases (#1042) c3c7ba3no-array-callback-reference: Improve suggestions for Array#forEach() (#1049) 77bcdc6no-new-buffer: Use suggestion for unknown arguments (#1037) 88a724cno-unreadable-array-destructuring: Add auto-fix (#1010) 27bc3c3new-for-builtins: Better auto-fix (#1022) 5ba0f83no-instanceof-array: Better auto-fix (#1020) 0520f31prefer-query-selector: Fix crash on unexpected selector (#1034) 88018cahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v26.0.1...v27.0.0
prefer-math-trunc: Use suggestion instead of auto-fix for x | 0 (#1014) 74b1b2d
prefer-math-trunc: Use suggestion instead of auto-fix for x | 0 (#1014) 74b1b2dhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v26.0.0...v26.0.1
`prefer-array-index-of` (#920) 517a782
no-new-array (#992) 48390c1prefer-array-index-of (#920) 517a782prefer-regexp-test (#970) 7b74b40consistent-destructuring (#325) 32bd31cimport-index rule from recommended preset (#977) ff1cd2eprefer-string-starts-ends-with: Remove check on String#match() (#1002) c9fa8b1no-array-callback-reference: Ignore AwaitExpression except reduce and reduceRight (#814) 4c2b00bprefer-string-starts-ends-with: Fix missing parentheses for some cases (#976) e2f94fe?? operator LogicExpression as a boolean value node (#986) dc7f79bhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.0...v26.0.0
Fix deprecated rules (#968) https://github.com/sindresorhus/eslint-plugin-unicorn/commit/9921acc966b8b4c7baac4a2a13f141a630a367fe
`prefer-array-some` (#887) b6a5a50
prefer-array-some (#887) b6a5a50prefer-default-parameters (#632) 8015768We 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-referenceno-array-instanceof → no-instanceof-arrayno-reduce → no-array-reduceprefer-dataset → prefer-dom-node-datasetprefer-flat-map → prefer-array-flat-mapprefer-replace-all → prefer-string-replace-allprefer-starts-ends-with → prefer-string-starts-ends-withprefer-text-content → prefer-dom-node-text-contentprefer-trim-start-end → prefer-string-trim-start-endprefer-event-key → prefer-keyboard-event-keyprefer-node-append → prefer-dom-node-appendprefer-node-remove → prefer-dom-node-remove20c6341
explicit-length-check: Make rule work in many more cases (#943) f3bc798explicit-length-check: Check unsafe LogicalExpressions (#952) a1b60adexplicit-length-check: Check Boolean(foo.length) (#951) f4577f7explicit-length-check: Check more cases (#941) 83a6453new-for-builtins: Ignore Object(x) === x and Object(x) !== x (#944) 5c7ea92explicit-length-check: Rewrite rule (#938) 94ae87ahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v24.0.0...v25.0.0
`empty-brace-spaces` (#933) c137daa
no-lonely-if (#936) 485dbf9empty-brace-spaces (#933) c137daaprefer-date-now (#935) d0c4826prevent-abbreviations: Add ignore option (#891) 898fcb4no-useless-undefined: Add checkArguments option (#877) a1617b9consistent-function-scoping: Allow ignoring arrow functions (#932) 17bf27cerror-message rule (#922) 877bef9prefer-query-selector rule (#908) 635601dprevent-abbreviations: Add var/vars replacements (#894) 07dadf5prevent-abbreviations: Add ver → version replacement (#870) e755cddprefer-number-properties: Support computed key of ClassProperty MethodDefinition Property (#886) 769ac35prefer-optional-catch-binding: Improve output (#884) 375d11ano-null: Exclude useRef(null) and React.useRef(null) (#890) 7a4dbf4prefer-number-properties: Add Infinity support (#874) 643169bno-console-spaces: Improve report location (#866) 190cbacno-useless-undefined: Ignore toHaveBeenCalledWith method (#876) d10a641prefer-replace-all: Handle u flag (#879) d98d867no-for-loop: Improve output when using the TypeScript parser (#883) 52edd3bno-for-loop: Respect declaration kind (#878) df3f7bdno-for-loop: Only report on the for loop head part (#885) e9c6963false import styles seen in reported problem messages (#910) d669707import-style: Fix crash on babel-eslint parser (#927) 9f5f721prevent-abbreviations: Fix crash with TypeScript parser (#913) 9d5eca6prefer-query-selector: Fix crash on calling without argument (#906) 36908daimport-style: Fix crash on destructing require (#904) 8335d41new-for-builtins: Remove auto-fix for new String, new Boolean(), and new Number() (#907) dfc1ce0https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v23.0.0...v24.0.0
Add `prefer-math-trunc` rule (#851) 5ee2432
prefer-math-trunc rule (#851) 5ee2432numeric-separators-style rule (#833) 6c9b531prefer-ternary rule (#514) d59cf95explicit-length-check: Use 'non-zero': 'greater-than' by default (#850) 7c5df5fprevent-abbreviations: Add fn/func -> function, i/idx/j -> index replacements (#836) e502f42consistent-function-scoping: Check anonymous functions (#835) 29ecbf6no-console-spaces: Make space position more specific (#838) e17a63fno-nested-ternary: Improve report location & message (#844) ca1afa6prefer-flat-map: Exclude .flat() where depth is not 1 (#859) 61d9851https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v22.0.0...v23.0.0
Add `import-style` rule (#789) 0c7a199
import-style rule (#789) 0c7a199Children in no-fn-reference-in-iterator (#809) 036e440filename-case: Ignore more index files (#826) 64d03a5ecmaVersion to 2021 (#820) a78cea3prefer-trim-start-end: Fix error message, improve report location (#823) b35c261number-literal-case: Fix false positive on @typescript-eslint/parser (#815) 33a1268no-unused-properties: Fix error thrown when using rest in object destructuring (#811) 1475f39https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v21.0.0...v22.0.0
Add `prefer-array-find` rule (#735) 12b46da
prefer-array-find rule (#735) 12b46dano-object-as-default-parameter rule (#633) 9989d2dev to event default replacement to prevent-abbreviations rule (#793) a0b4abano-fn-reference-in-iterator and no-reduce rule (#756) 5159c24unicorn/prefer-flat-map not enabled by default in the recommended config 655220aconsistent-function-scoping report location (#778) df218a2consistent-function-scoping message (#773) 4ed2adfconsistent-function-scoping: Fix wrong detect of IIFE (#772) f7127daprefer-starts-ends-with: Fix pipe in regex (#783) 1dca2f3prevent-abbreviations: Fix optional parameter (#764) 7781c3fno-useless-undefined: Ignore undefined use in compare functions (#758) 6d36407https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v20.1.0...v21.0.0
Use singular array element variable name in autofix for no-for-loop rule (#745) 2002093
no-for-loop rule (#745) 2002093no-for-loop rule (#749) 48bd5c8https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v20.0.0...v20.1.0
Require ESLint 7 (#577) e4f44f3
prefer-optional-catch-binding rule (#671) efdb03ano-useless-undefined rule (#718) 30dbe6dno-reduce rule (#704) 06ed7eethrow-new-error: Check MemberExpression customError (#716) a28aad5prefer-starts-ends-with: Add auto-fix (#711) da978e3consistent-function-scoping: Ignore IIFE (#707) 1f4413dprefer-set-has: Ignore arrays only checking existence once (#706) 54c6f54prefer-starts-ends-with: Fix bug with m flag (#721) 83bbabcprefer-string-slice: Handle negative length in .substr() (#709) 7439465https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v19.0.1...v20.0.0
no-fn-reference-in-iterator: Ignore this. and Vue.filter (#699) b02a9c6
no-fn-reference-in-iterator: Ignore this. and Vue.filter (#699) b02a9c6no-fn-reference-in-iterator: Ignore cases obviously not a function reference (#697) dae5107https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v19.0.0...v19.0.1
Add `no-null` rule (#636) c773c16
no-null rule (#636) c773c16string-content: Make it have no default patterns (#637) 08fad55catch-error-name: Replace caughtErrorsIgnorePattern option with an ignore option (#661) 5a27f04custom-error-definition: Support class properties (#673) 9cc8d60catch-error-name: Support Promise#then (#660) edcf73cprefer-set-has: Supports more types of array (#641) 29f3c9cescape-case: Fix missing characters (#678) d986427no-nested-ternary: Fix incorrect result with TypeScript parser (#664) cb08ed0custom-error-definition: Fix duplicated reports on this.message assign (#669) aa00647custom-error-definition: Fix crash on @typescript-eslint/parser (#659) e8cb921catch-error-name: Improve error message (#665) 8ac9a90catch-error-name: Fix error renaming (#654) cc2d1b1catch-error-name: Only allow _ when it's not used (#650) 0c31a0bcatch-error-name: Ignore destructuring (#649) b2838fdhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v18.0.1...v19.0.0
prefer-number-properties: Fix suggestion description (#635) d410ca3
prefer-number-properties: Fix suggestion description (#635) d410ca3https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v18.0.0...v18.0.1
Add `prefer-number-properties` rule (#622) 8d8ce43
prefer-number-properties rule (#622) 8d8ce43prefer-set-has rule (#604) 9fa8de1ignore option to expiring-todo-comment rule (#555) 08fabf6no-console-spaces: Fix crash on string contains \n (#629) 9cd01cdexplicit-length-check: Ignore computed length of MemberExpression (#620) 418e072prefer-spread: Insert semicolon in more cases (#615) de48b3dcatch-error-name: Keep typeAnnotation when replacing identifier (#613) 446ff37prevent-abbreviations: Fix crash on TypeParameter with default value (#606) 2ef7a21prevent-abbreviations: Add global variables check (#603) b5c0a12regexp-tree to fix whitespace rewrite (#605) 2b78a17https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v17.2.0...v18.0.0
consistent-function-scoping: Check use of this and arguments (#590) 8b417e6
consistent-function-scoping: Check use of this and arguments (#590) 8b417e6prevent-abbreviations: Fix inappropriate suggestion (#592) 2e20294consistent-function-scoping: Ignore within React hooks (#588) 7126d6dstring-content: Ignore some TaggedTemplateExpression (#585) 92f3f3dconsistent-function-scoping: Display function name in error message (#589) e7e49ecconsistent-function-scoping: Fix uninitialized variable check (#587) 4c48c02https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v17.1.0...v17.2.0
Allow descriptive error names by default in catch-error-name rule (#581) 7bd8687
catch-error-name rule (#581) 7bd8687https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v17.0.1...v17.1.0
Fix a problem with deprecated rules (#584) fe8f336
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v17.0.0...v17.0.1
Add `string-content` rule (off by default) (#496) 0972a89
string-content rule (off by default) (#496) 0972a89regex-shorthand rule to better-regex (#522) a5e5405new-for-builtins rule (#540) fdd96cbprefer-node-remove rule (#507) b6e6b32prefer-spread: Insert semicolon if needed (#578) 49c4acfprefer-negative-index crash on not enough arguments (#564) 50e038cconsistent-function-scoping (#562) ec4387cno-new-buffer crash on TypeScript-ESLint (#560) e4f4bb4escape-case missing cases (#534) 892f054.onmessage in prefer-add-event-listener rule (#543) 96af562https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v16.1.1...v17.0.0
Fix escape-case fixer bug on template literals (#525) cb24d44
escape-case fixer bug on template literals (#525) cb24d44https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v16.1.0...v16.1.1
Ensure all the rules are compatible with TypeScript-ESLint (#519) 3bff4fd
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v16.0.0...v16.1.0
Deprecate our prefer-exponentiation-operator rule in favor of the built-in ESLint rule (#484) c4ffb1a
prefer-replace-all rule (#488) d98c277regex-shorthand rule (#468) fb0268bprefer-exponentiation-operator rule in favor of the built-in ESLint rule (#484) c4ffb1anumber-literal-case rule (#490) cea1346expiring-todo-comments crashing on invalid package version (#494) fd46adcno-for-loops rule (#489) 94345a3prefer-modern-dom-apis: Only fix when expression is not used (#503) 096feadprefer-node-remove: Only fix when expression is not used (#498) b1d3f37https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v15.0.1...v16.0.0
Fix Node.js 8 compatibility 54d3a01
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v15.0.0...v15.0.1
`prefer-modern-dom-apis` (#362) 44d14b9
prefer-modern-dom-apis (#362) 44d14b9prevent-abbreviations rule replacements and whitelist (#464) cfd3d49no-for-loops rule (#476) 44a67f1https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v14.0.1...v15.0.0
Fix crashing issues with the regex-shorthand rule (#454) db41877
regex-shorthand rule (#454) db41877https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v14.0.0...v14.0.1
Add `prefer-negative-index` rule (#417) 20dfb65
prefer-negative-index rule (#417) 20dfb65prefer-trim-start-end rule (#440) 29e3b13prefer-string-slice rule (#424) 567c970ignoreImports option to import-index rule (#421) bda7769regex-shorthand rule use regexp-tree for regex literals (#437) 3554c17prevent-abbreviations rule fixer bug (#444) fa8c80ecustom-error-definition rule to support constructors without a body (#442) a496e96https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v13.0.0...v14.0.0
Change some options for prevent-abbreviations rule (#422) 4d5f5cb The checkDefaultAndNamespaceImports and checkShorthandImports options accept a strin
prevent-abbreviations rule (#422) 4d5f5cb
The checkDefaultAndNamespaceImports and checkShorthandImports options accept a string instead of a boolean now. The default value changed from always checking to only checking internal imports (meaning local modules and not published packages).expiring-todo-comments rule (#435) a03132eignore option to the filename-case rule (#431) 1bc47a0require() in import-index rule (#436) 393e8e1https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v12.1.0...v13.0.0
Improve prefer-includes rule (#411) 32851cc
prefer-includes rule (#411) 32851cccheckProperties default value to false for prevent-abbreviations (#404) d279f2ahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v12.0.2...v12.1.0
Fix an error where the rules in some situation could not be found a026ae5
allowWarningComments option default to true for expiring-todo-comments rule (#400) 5f409ffhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v12.0.1...v12.0.2
Handle lack of package.json in expiring-todo-comments rule (#397) f9f6ee6
expiring-todo-comments rule (#397) f9f6ee6https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v12.0.0...v12.0.1
Add `prefer-string-slice` rule (#288) cbd5dfc
prefer-string-slice rule (#288) cbd5dfcfilename-case rule to handle complicated filename (#381) 871dab7prevent-abbreviations to ignore uppercase letters (#379) 50e6655expiring-todo-comments rule for programmatic usage of ESLint (#385) b5cf874no-process-exit rule in worker threads (#388) 90ca979https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v11.0.2...v12.0.0
unicorn/prefer-dataset: Fix querySelector fixer (#383) 3ba54e9
unicorn/prefer-dataset: Fix querySelector fixer (#383) 3ba54e9https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v11.0.1...v11.0.2
consistent-function-scoping: Ignore anything containing JSX (#382) 8a999c0
consistent-function-scoping: Ignore anything containing JSX (#382) 8a999c0consistent-function-scoping: Do not fail on same-scoped function references (#378) b62d96ehttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v11.0.0...v11.0.1
Add `expiring-todo-comments` rule (#302) 6b6cee5
expiring-todo-comments rule (#302) 6b6cee5no-nested-ternary rule (#296) 767fa8dconsistent-function-scoping rule (#309) 91bbff5prefer-reflect-apply rule (#239) 0b9c0feprefer-dataset rule (#225) 0910972prevent-abbreviations rule: 9b81e11 8ff4d91 dc8841a f500437
param → parameterparams → parameterscur → currentcurr → currentacc → accumulatordir → directionBigInt64Array and BigUint64Array types to the new-for-builtins rule (#353) e7ff2deisBigInt type check to the prefer-type-error rule (#356) 186abd3prevent-abbreviations rule to handle more cases (#337) 9db361feslint --stdin (#346) 5e7ac3ecatch-error-name rule (#363) 05641bahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v10.0.0...v11.0.0
Require ESLint 6 (#331) bd9e00b
no-keyword-prefix rule (#282) 1982af5checkFilenames option to the prevent-abbreviations rule (#336) 4c3d61cxo/no-abusive-eslint-disable via a comment (#308) 0fb6fcfno-fn-reference-in-iterator rule (#281) 7410a1ehttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v9.1.1...v10.0.0
prefer-node-append: Only fix when expression is not used (#321) d62666d
prefer-node-append: Only fix when expression is not used (#321) d62666dhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v9.1.0...v9.1.1
Apply the escape-case rule to regex literals and remove transformation of \c escape on string literals (#294) 79748e1
escape-case rule to regex literals and remove transformation of \c escape on string literals (#294) 79748e1BigInt type to the new-for-builtins rule (#310) e17f0fd.flat() has more than one parameter or if the one parameter is not 1 (#317) 6f10722custom-error-definition: Cover exports name (#313) 3f2e9a6https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v9.0.0...v9.1.0
Use underscore naming pattern in the catch-error-name rule (#306) 0f8d5b4
catch-error-name rule (#306) 0f8d5b4prefer-event-key rule (#226) 9bede78prefer-flat-map rule (#284) d440daacases option to the filename-case rule (#291) 43a6e9ano-for-loop rule handle more cases (#297) 3c0c7b9import-index rule handle more cases (#293) f0c0a4fprefer-exponentiation-operator rule (#305) dc90c1eprefer-includes rule fixer omitting parentheses (#287) e36d25chttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.2...v9.0.0
Don't use non-standard AST property in no-for-loop rule (#279) b86d456
no-for-loop rule (#279) b86d456https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.1...v8.0.2
Fix prevent-abbreviations breaking shorthand properties in assignment patterns (#268) d30751a
prevent-abbreviations breaking shorthand properties in assignment patterns (#268) d30751ahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.0...v8.0.1
This release is focused on helping you write more readable code and to adopt modern APIs. My favorite is the `prevent-abbreviations` rule, which encou
This release is focused on helping you write more readable code and to adopt modern APIs. My favorite is the prevent-abbreviations rule, which encourages you to pick readable variable names.
prevent-abbreviations rule (#237) 76ff30eno-for-loop rule (#221) b94ab9ano-zero-fractions rule (#244) 75b8192prefer-includes rule (#214) a330d74prefer-text-content rule (#223) c493115prefer-node-remove rule (#222) fda5517meta.type to rules (#241) 610a901excludedPackages option to the prefer-add-event-listener rule (#235) f141a4cprefer-add-event-listener rule (#216) 7503d12filename-case rule 139ac16catch-error-name fixer not renaming all references in .catch case (#258) c2e4a9donbeforeunload unless it's handler does not return anything (#218) db2f192no-fn-reference-in-iterator rule (#172) 73e8d5dhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v7.1.0...v8.0.0
Make the catch-error-name rule fixable in most cases (#209) 3c66c0e
catch-error-name rule fixable in most cases (#209) 3c66c0eno-abusive-eslint-disable rule support shorthand syntax (#212) fcee1c6https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v7.0.0...v7.1.0
Add `prefer-query-selector` rule (#198) a44e16c
prefer-query-selector rule (#198) a44e16cprefer-node-append rule (#201) 9da5e6ano-unused-properties rule (#195) 0179443no-unreadable-array-destructuring rule (#199) 62c51a7no-console-spaces rule (#191) 5dd529fhttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v6.0.1...v7.0.0
It's a major release as the recommended config received new rules which could potentially break your build.
catch-error-name rule: Support optional catch binding
catch-error-name rule: Support optional catch binding (#187)Add prefer-exponentiation-operator rule. (#185) 9f7f811
prefer-exponentiation-operator rule. (#185) 9f7f811name option of the catch-error-name rule to be error instead of err. 7a1f1a1catch-error-name rule. 341ee3aregex-shorthand rule: Escape backslash and apostrophe. (#183) 8a50f40filename-case rule: Survive missing options block. (#184) 2283cdahttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v5.0.0...v6.0.0
Require ESLint 5. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/a6ce053a9d2661d459a2d36728c15fc21353a41a
explicit-length-check rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/ad1fd85640a266fe85ebc0b0cffe6dcb21dca0c5https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v4.0.3...v5.0.0
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →