eslint-plugin-unicorn

More than 100 powerful ESLint rules

MIT License

Downloads
11.8M
Stars
3.9K
Committers
152

Bot releases are visible (Hide)

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

Enhancements

  • Apply the escape-case rule to regex literals and remove transformation of \c escape on string literals (#294) 79748e1
  • Add BigInt type to the new-for-builtins rule (#310) e17f0fd

Fixes

  • Do not warn if .flat() has more than one parameter or if the one parameter is not 1 (#317) 6f10722
  • custom-error-definition: Cover exports name (#313) 3f2e9a6

Meta

  • Welcome @MrHen as a maintainer 🎉 770fe42

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v9.0.0...v9.1.0

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

Breaking

  • Require Node.js 8 9b9d761
  • Use underscore naming pattern in the catch-error-name rule (#306) 0f8d5b4

New rules

Enhancements

  • Add cases option to the filename-case rule (#291) 43a6e9a
  • Make the no-for-loop rule handle more cases (#297) 3c0c7b9
  • Make the import-index rule handle more cases (#293) f0c0a4f

Fixes

  • Fix operator precedence bugs in the prefer-exponentiation-operator rule (#305) dc90c1e
  • Fix the prefer-includes rule fixer omitting parentheses (#287) e36d25c

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.2...v9.0.0

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

  • Don't use non-standard AST property in no-for-loop rule (#279) b86d456

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.1...v8.0.2

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

  • Fix prevent-abbreviations breaking shorthand properties in assignment patterns (#268) d30751a

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.0...v8.0.1

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

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.

New rules

Enhancements

  • Add meta.type to rules (#241) 610a901
  • Add excludedPackages option to the prefer-add-event-listener rule (#235) f141a4c
  • Add event clearing to prefer-add-event-listener rule (#216) 7503d12

Fixes

  • Fix the default value for the filename-case rule 139ac16
  • Fix ES2015 exports not counting an object as used (#217) 6d5bb10
  • Fix catch-error-name fixer not renaming all references in .catch case (#258) c2e4a9d
  • Don't fix onbeforeunload unless it's handler does not return anything (#218) db2f192
  • Prevent false-positives in the no-fn-reference-in-iterator rule (#172) 73e8d5d

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v7.1.0...v8.0.0

eslint-plugin-unicorn -

Published by sindresorhus over 5 years ago

  • Make the catch-error-name rule fixable in most cases (#209) 3c66c0e
  • Make the no-abusive-eslint-disable rule support shorthand syntax (#212) fcee1c6

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v7.0.0...v7.1.0

eslint-plugin-unicorn -

Published by sindresorhus almost 6 years ago

https://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.

eslint-plugin-unicorn -

Published by sindresorhus about 6 years ago

  • catch-error-name rule: Support optional catch binding (#187)
eslint-plugin-unicorn -

Published by sindresorhus about 6 years ago

  • Add prefer-exponentiation-operator rule. (#185) 9f7f811
  • Change the default name option of the catch-error-name rule to be error instead of err. 7a1f1a1
  • Re-enable the catch-error-name rule. 341ee3a
  • Include the plugin itself in the recommended preset. a41a77b
  • regex-shorthand rule: Escape backslash and apostrophe. (#183) 8a50f40
  • filename-case rule: Survive missing options block. (#184) 2283cda

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v5.0.0...v6.0.0

eslint-plugin-unicorn -

Published by sindresorhus over 6 years ago

eslint-plugin-unicorn -

Published by sindresorhus almost 7 years ago

eslint-plugin-unicorn -

Published by sindresorhus almost 7 years ago

All changes: https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v2.1.1...v3.0.0

unicorn26

eslint-plugin-unicorn - 2.1.1

Published by sindresorhus over 7 years ago

Disable the escape-case and no-hex-escape rules in the recommended config until they work reliably. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/b892525e19e01150972abdaf44515d367f17e3ee

See: #85

eslint-plugin-unicorn - 2.1.0

Published by sindresorhus over 7 years ago

  • Support custom errors in the throw-new-error rule
  • Bug fix for number only escapes in escape-case rule

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v2.0.1...v2.1.0

eslint-plugin-unicorn - 2.0.1

Published by sindresorhus over 7 years ago

Fixed some urgent crasher issues.


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

eslint-plugin-unicorn - 2.0.0

Published by sindresorhus over 7 years ago

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)

https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v1.0.0...v2.0.0

unicorn3

Package Rankings
Top 0.62% on Npmjs.org
Top 9.55% on Proxy.golang.org
Top 19.29% on Repo1.maven.org
Badges
Extracted from project README
Coverage Status npm version