Unicorn
245 rules eslint-plugin-unicorn@78.0.0
Complete effective rule inventory.
Rules
No enabled Unicorn rules match this search.
-
unicorn/no-undeclared-class-membersRequire class members to be declared.
: error in All Unicorn contexts -
unicorn/no-unnecessary-array-flat-depthDisallow using
1as thedepthargument ofArray#flat().: error in All Unicorn contexts -
unicorn/no-unnecessary-array-flat-mapDisallow unnecessary use of
Array#flatMap().: error in All Unicorn contexts -
unicorn/no-unnecessary-array-splice-countDisallow using
.lengthorInfinityas thedeleteCountorskipCountargument ofArray#{splice,toSpliced}().: error in All Unicorn contexts -
unicorn/no-unnecessary-awaitDisallow awaiting non-promise values.
: error in All Unicorn contexts -
unicorn/no-unnecessary-boolean-comparisonDisallow unnecessary comparisons against boolean literals.
: error in All Unicorn contexts -
unicorn/no-unnecessary-default-argumentsDisallow arguments that match their parameter defaults.
: error in All Unicorn contexts -
unicorn/no-unnecessary-fetch-optionsDisallow unnecessary options in
fetch()andnew Request().: error in All Unicorn contexts -
unicorn/no-unnecessary-global-thisDisallow unnecessary
globalThisreferences.: error in All Unicorn contexts -
unicorn/no-unnecessary-nested-ternaryDisallow unnecessary nested ternary expressions.
: error in All Unicorn contexts -
unicorn/no-unnecessary-parametersDisallow parameters that receive the same value at every call.
: error in All Unicorn contexts -
unicorn/no-unnecessary-polyfillsEnforce the use of built-in methods instead of unnecessary polyfills.
: error in All Unicorn contexts -
unicorn/no-unnecessary-slice-endDisallow using
.lengthorInfinityas theendargument of{Array,String,TypedArray}#slice().: error in All Unicorn contexts -
unicorn/no-unnecessary-spliceDisallow
Array#splice()when simpler alternatives exist.: error in All Unicorn contexts -
unicorn/no-unnecessary-string-trimDisallow
String#trim()beforeString#startsWith()orString#endsWith().: error in All Unicorn contexts -
unicorn/no-unsafe-buffer-conversionPrevent unsafe use of ArrayBuffer view
.buffer.: error in All Unicorn contexts -
unicorn/no-unsafe-dom-htmlDisallow unsafe DOM HTML APIs.
: error in All Unicorn contexts -
unicorn/no-unsafe-json-serializationDisallow known values that JSON serialization cannot represent faithfully.
: error in All Unicorn contexts -
unicorn/no-unsafe-promise-all-settled-valuesDisallow reading
.valuefromPromise.allSettled()results without a fulfilled status guard.: error in All Unicorn contexts -
unicorn/no-unsafe-property-keyDisallow unsafe values as property keys.
: error in All Unicorn contexts -
unicorn/no-unsafe-sqlite-interpolationDisallow interpolation into SQL strings passed to Node’s
node:sqliteAPIs.: error in All Unicorn contexts -
unicorn/no-unsafe-string-replacementDisallow non-literal replacement values in
String#replace()andString#replaceAll().: error in All Unicorn contexts -
unicorn/no-unused-builtin-method-returnDisallow ignoring the return value of selected built-in methods.
: error in All Unicorn contexts -
unicorn/no-unused-iterator-helperDisallow discarding lazy iterator helpers.
: error in All Unicorn contexts -
unicorn/no-url-in-search-paramsDisallow passing full URLs to
URLSearchParams.: error in All Unicorn contexts -
unicorn/no-useless-boolean-castDisallow unnecessary
Boolean()casts in array predicate callbacks.: error in All Unicorn contexts -
unicorn/no-useless-coercionDisallow useless type coercions of values that are already of the target type.
: error in All Unicorn contexts -
unicorn/no-useless-collection-argumentDisallow useless values or fallbacks in
Set,Map,WeakSet, orWeakMap.: error in All Unicorn contexts -
unicorn/no-useless-compound-assignmentDisallow useless compound assignments such as
x += 0.: error in All Unicorn contexts -
unicorn/no-useless-concatDisallow useless concatenation of literals.
: error in All Unicorn contexts -
unicorn/no-useless-continueDisallow useless
continuestatements.: error in All Unicorn contexts -
unicorn/no-useless-delete-checkDisallow unnecessary existence checks before deletion.
: error in All Unicorn contexts