Skip to content

Releases: sindresorhus/eslint-plugin-unicorn

2.1.0

10 Mar 03:08
Compare
Choose a tag to compare
  • Support custom errors in the throw-new-error rule
  • Bug fix for number only escapes in escape-case rule

v2.0.1...v2.1.0

2.0.1

06 Feb 10:53
Compare
Choose a tag to compare

Fixed some urgent crasher issues.


Help wanted to add integration tests so this doesn't happen in the future.

2.0.0

06 Feb 08:17
Compare
Choose a tag to compare

8 new rules

  • number-literal-case - Enforce lowercase identifier and uppercase value for number literals. (fixable)
  • no-array-instanceof - Disallow instanceof Array, instead use Array.isArray(). (fixable)
  • no-new-buffer - Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new 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)

v1.0.0...v2.0.0

unicorn3