More than 100 powerful ESLint rules
MIT License
Bot releases are visible (Hide)
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
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
no-for-loop
rule (#279) b86d456https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v8.0.1...v8.0.2
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 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
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
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.
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
explicit-length-check
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/ad1fd85640a266fe85ebc0b0cffe6dcb21dca0c5
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v4.0.3...v5.0.0
prefer-add-event-listener
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/b7e4afbf6562b93d88f6c652a64df72316c73004
prefer-spread rule
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/aeedf6fa7c7f69520b03df493a07dd46b3d1caa6
no-unsafe-regex
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/b1beb61bf3a5f1c0c2c6e2b862907dffcef65b60error-message
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/dd05f68f42b51c5941a59fb1509ef48bad658440
caughtErrorsIgnorePattern
option to catch-error-name
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/54738bed4936a2f06215bc124081d0fc6dd571a1
filename-case
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/6a9b550f08461b35c99a465dc7c42420c90eb089
no-abusive-eslint-disable
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/1b7c27f5c7d10d5ed6acfe1e37192f497a1f27f0
regex-shorthand
rule. https://github.com/sindresorhus/eslint-plugin-unicorn/commit/adc59dbb5d7740ad983cc1425bc8317651f858ad
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v3.0.1...v4.0.0
Big thanks to @johnwu93 @bdougherty @evilebottnawi @Arcanemagus @sudo-suhas for contributing to this release! 🎉
import-index
rule. cab60da3649ab4ab058d90880b301dbdb10d4473new-for-builtins
rule. 9dfd50858ef20c76d8ad68efb85560e812b7f99aregex-shorthand
rule. cba8dd9f31f2ff5646376b137a85f95ab2567e98no-fn-reference-in-iterator
rule. c11cc5db3db15087314c85dd98055a555818346bexplicit-length-check
rule. 0c61fde82a8f01c61e34b38b55ef5105f5487a9fescape-case
and no-hex-escape
rules. They were previously disabled because of some issues. 81b92a945620ed4bbcc10fe7220ab25a8c92667bAll changes: https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v2.1.1...v3.0.0
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
Published by sindresorhus over 7 years ago
throw-new-error
ruleescape-case
rulehttps://github.com/sindresorhus/eslint-plugin-unicorn/compare/v2.0.1...v2.1.0
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.
Published by sindresorhus over 7 years ago
instanceof Array
, instead use Array.isArray()
. (fixable)
Buffer.from()
and Buffer.alloc()
instead of the deprecated new Buffer()
. (fixable)
Error
subclassing. (fixable)
String#startsWith
& String#endsWith
over more complex alternatives.TypeError
in type checking conditions. (fixable)
https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v1.0.0...v2.0.0