Unicorn
223 rules eslint-plugin-unicorn@76.0.0
Complete effective rule inventory.
Rules
No enabled Unicorn rules match this search.
-
unicorn/prefer-string-trim-start-endPrefer
String#trimStart()/String#trimEnd()overString#trimLeft()/String#trimRight().: error in All Unicorn contexts -
unicorn/prefer-structured-clonePrefer using
structuredCloneto create a deep clone.: error in All Unicorn contexts -
unicorn/prefer-switchPrefer
switchover multipleelse-if.: error in All Unicorn contexts -
unicorn/prefer-then-catchPrefer
.then().catch()over.then(…, …)for error handling.: error in All Unicorn contexts -
unicorn/prefer-top-level-awaitPrefer top-level await over top-level promises and async function calls.
: error in All Unicorn contexts -
unicorn/prefer-type-errorEnforce throwing
TypeErrorin type checking conditions.: error in All Unicorn contexts -
unicorn/prefer-unary-minusPrefer the unary minus operator over multiplying or dividing by
-1.: error in All Unicorn contexts -
unicorn/prefer-unicode-code-point-escapesPrefer Unicode code point escapes over legacy escape sequences.
: error in All Unicorn contexts -
unicorn/prefer-url-can-parsePrefer
URL.canParse()over constructing aURLin a try/catch for validation.: error in All Unicorn contexts -
unicorn/prefer-url-search-parametersPrefer
URLSearchParamsover manually splitting query strings.: error in All Unicorn contexts -
unicorn/prefer-while-loop-conditionPrefer putting the condition in the while statement.
: error in All Unicorn contexts -
unicorn/relative-url-styleEnforce consistent relative URL style.
: error in All Unicorn contexts -
unicorn/require-array-join-separatorEnforce using the separator argument with
Array#join().: error in All Unicorn contexts -
unicorn/require-css-escapeRequire
CSS.escape()for interpolated values in CSS selectors.: error in All Unicorn contexts -
unicorn/require-module-attributesRequire non-empty module attributes for imports and exports
: error in All Unicorn contexts -
unicorn/require-module-specifiersRequire non-empty specifier list in import and export statements.
: error in All Unicorn contexts -
unicorn/require-number-to-fixed-digits-argumentEnforce using the digits argument with
Number#toFixed().: error in All Unicorn contexts -
unicorn/require-passive-eventsRequire passive event listeners for high-frequency events.
: error in All Unicorn contexts -
unicorn/require-post-message-target-originEnforce using the
targetOriginargument withwindow.postMessage().: error in All Unicorn contexts -
unicorn/require-proxy-trap-boolean-returnRequire boolean-returning Proxy traps to return booleans.
: error in All Unicorn contexts -
unicorn/single-line-block-comment-styleEnforce a consistent style for single-line block comments.
: warning in All Unicorn contexts -
unicorn/text-encoding-identifier-caseEnforce consistent case for text encoding identifiers.
: error in All Unicorn contexts -
unicorn/throw-new-errorRequire
newwhen creating an error.: error in All Unicorn contexts