Releases: sindresorhus/eslint-plugin-unicorn
Releases Β· sindresorhus/eslint-plugin-unicorn
v44.0.2
v44.0.1
v44.0.0
New rules
Improvements
prefer-array-find
: Add option to also prefer.findLast()
(#1900) 02252c7template-indent
: Preserve trailing spaces (#1872) e4071f5no-document-cookie
: Checkwindow.document.cookie
(#1833) 0886544prefer-array-index-of
: Prefer.lastIndexOf()
over.findLastIndex()
(#1896) 70e5bddprefer-array-some
: Check.findLast()
(#1897) 3e6ae43prefer-native-coercion-functions
: Check.findLast
and.findLastIndex
(#1893) f2c6accno-array-method-this-argument
: Check.findLast
and.findLastIndex
(#1890) 3bc28adno-array-callback-reference
: Check.findLast
and.findLastIndex
(#1889) 37a5cdaprefer-negative-index
: RemoveArrayBuffer#at
(#1899) a10e3f6prefer-at
: Improve fix (#1901) 1c457bb
Fixes
v43.0.2
v43.0.1
- Remove
prefer-event-target
from the recommended preset 4d2faacEventTarget
requires Node.js 16 and we target Node.js 14. We'll enable it again in a year when we can target Node.js 16.
v43.0.0
New rules
Breaking
- Require Node.js 14
Improvements
- Add
prefer-top-level-await
rule to recommended preset (#1803) 6f5ecf5 - Deprecate
import-index
rule (#1787) 0034e69 - Update abbreviations to support Next.js functions (#1804) 4b96057
text-encoding-identifier-case
: Ignore JSXmeta[charset="utf-8"]
(#1817) c67a70fprefer-number-properties
: Check any use of global functions (#1834) 51d7e06prefer-number-properties
: Detect usage via global object (#1832) 80c4af2no-array-for-each
: Check reassign infor..in
andfor..of
(#1824) d3b2548no-useless-undefined
: Ignoreref(undefined)
in Vue project (#1828) e7306e5prefer-node-protocol
: Always checkrequire()
(#1827) 2c914d4no-array-for-each
: Improve parameter reassign detection (#1823) 56df468no-array-for-each
: Add fix for arrow function body (#1785) 59218e3
Fixes
v42.0.0
The project has passed 100 lint rules π
Thanks to everyone that has contributed so far.
And special thanks to our team member @fisker for doing most of the work on this project. We could not have gotten this far without him.
New rules
no-useless-switch-case
(#1779) a8fb966prefer-modern-math-apis
(#1780) 6dfdeb0no-unreadable-iife
(#1765) ce8a4b7prefer-native-coercion-functions
(#1767) 51166f4
Improvements
template-indent
: Set the ruleerror
instead ofwarn
inrecommended
preset (#1781) 09923afprefer-json-parse-buffer
: Remove fromrecommended
preset (#1750) 93f49f2no-array-for-each
: Add fixer for parenthesized call (#1784) 5f39c37no-array-for-each
: Handle optional chaining (#1753) 1d32db4prefer-object-from-entries
: Stop checking unknown cases (#1771) 309771dprefer-string-trim-start-end
: Check optional chaining (#1768) 1920597no-useless-undefined
: Ignore arguments inFunction#bind()
(#1762) c501243prefer-ternary
: Skip fix if there are comments (#1763) 3013565text-encoding-identifier-case
: Auto-fix encoding infs.{readFile,readFileSync}()
(#1755) 5e1c932- Add
dist
anddst
abbreviations (#1756) dffcea8