Releases: sindresorhus/eslint-plugin-unicorn
Releases · sindresorhus/eslint-plugin-unicorn
2.1.0
- Support custom errors in the
throw-new-error
rule - Bug fix for number only escapes in
escape-case
rule
2.0.1
Fixed some urgent crasher issues.
Help wanted to add integration tests so this doesn't happen in the future.
2.0.0
8 new rules
- number-literal-case - Enforce lowercase identifier and uppercase value for number literals. (fixable)
- no-array-instanceof - Disallow
instanceof Array
, instead useArray.isArray()
. (fixable) - no-new-buffer - Enforce the use of
Buffer.from()
andBuffer.alloc()
instead of the deprecatednew Buffer()
. (fixable) - no-hex-escape - Enforce the use of unicode escapes instead of hexadecimal escapes. (fixable)
- escape-case - Require escape sequences to use uppercase values. (fixable)
- custom-error-definition - Enforces the only valid way of
Error
subclassing. (fixable) - prefer-starts-ends-with - Prefer
String#startsWith
&String#endsWith
over more complex alternatives. - prefer-type-error - Enforce throwing
TypeError
in type checking conditions. (fixable)