Unicorn
223 rules eslint-plugin-unicorn@76.0.0
Complete effective rule inventory.
Rules
No enabled Unicorn rules match this search.
-
unicorn/no-duplicate-set-valuesDisallow duplicate values in
Setconstructor array literals.: error in All Unicorn contexts -
unicorn/no-empty-fileDisallow empty files.
: error in All Unicorn contexts -
unicorn/no-error-property-assignmentDisallow assigning to built-in error properties.
: error in All Unicorn contexts -
unicorn/no-exports-in-scriptsDisallow exports in scripts.
: error in All Unicorn contexts -
unicorn/no-for-loopDo not use a
forloop that can be replaced with afor-ofloop.: error in All Unicorn contexts -
unicorn/no-global-object-property-assignmentDisallow assigning properties on the global object.
: error in All Unicorn contexts -
unicorn/no-immediate-mutationDisallow immediate mutation after variable assignment.
: error in All Unicorn contexts -
unicorn/no-impossible-length-comparisonDisallow impossible comparisons against
.lengthor.size.: error in All Unicorn contexts -
unicorn/no-incorrect-query-selectorDisallow incorrect
querySelector()andquerySelectorAll()usage.: error in All Unicorn contexts -
unicorn/no-incorrect-template-string-interpolationDisallow incorrect template literal interpolation syntax.
: error in All Unicorn contexts -
unicorn/no-instanceof-builtinsDisallow
instanceofwith built-in objects: error in All Unicorn contexts -
unicorn/no-invalid-argument-countDisallow calling functions and constructors with an invalid number of arguments.
: error in All Unicorn contexts -
unicorn/no-invalid-character-comparisonDisallow comparing a single character from a string to a multi-character string.
: error in All Unicorn contexts -
unicorn/no-invalid-fetch-optionsDisallow invalid options in
fetch()andnew Request().: error in All Unicorn contexts -
unicorn/no-invalid-file-input-acceptDisallow invalid
acceptvalues on file inputs.: error in All Unicorn contexts -
unicorn/no-invalid-remove-event-listenerPrevent calling
EventTarget#removeEventListener()with the result of an expression.: error in All Unicorn contexts -
unicorn/no-invalid-well-known-symbol-methodsDisallow invalid implementations of well-known symbol methods.
: error in All Unicorn contexts -
unicorn/no-late-current-target-accessDisallow accessing
event.currentTargetafter the synchronous event dispatch has finished.: error in All Unicorn contexts -
unicorn/no-late-event-controlDisallow event-control method calls after the synchronous event dispatch has finished.
: error in All Unicorn contexts -
unicorn/no-loop-iterable-mutationDisallow mutating a loop iterable during iteration.
: error in All Unicorn contexts -
unicorn/no-magic-array-flat-depthDisallow a magic number as the
depthargument inArray#flat(…).: error in All Unicorn contexts -
unicorn/no-mismatched-map-keyDisallow checking a Map key before accessing a different key.
: error in All Unicorn contexts -
unicorn/no-misrefactored-assignmentDisallow misrefactored compound assignments where the target is duplicated in the right-hand side.
: error in All Unicorn contexts -
unicorn/no-missing-local-resourceDisallow references to missing local resources.
: error in All Unicorn contexts -
unicorn/no-multiple-promise-resolver-callsDisallow calling Promise executor resolver functions more than once on the same execution path.
: error in All Unicorn contexts -
unicorn/no-negation-in-equality-checkDisallow negated expression in equality check.
: error in All Unicorn contexts -
unicorn/no-new-arrayDisallow
new Array().: error in All Unicorn contexts -
unicorn/no-new-bufferEnforce the use of
Buffer.from()andBuffer.alloc()instead of the deprecatednew Buffer().: error in All Unicorn contexts -
unicorn/no-nonstandard-builtin-propertiesDisallow non-standard properties on built-in objects.
: error in All Unicorn contexts -
unicorn/no-object-as-default-parameterDisallow the use of objects as default parameters.
: error in All Unicorn contexts -
unicorn/no-object-methods-with-collectionsDisallow
Objectmethods withMaporSet.: error in All Unicorn contexts -
unicorn/no-optional-chaining-on-undeclared-variableDisallow optional chaining on undeclared variables.
: error in All Unicorn contexts -
unicorn/no-redundant-comparisonDisallow comparisons made redundant by an equality check in the same logical AND.
: error in All Unicorn contexts -
unicorn/no-return-array-pushDisallow using the return value of
Array#push()andArray#unshift().: error in All Unicorn contexts -
unicorn/no-selector-as-dom-nameDisallow selector syntax in DOM names.
: error in All Unicorn contexts -
unicorn/no-shorthand-property-overridesDisallow shorthand properties that override related longhand properties.
: error in All Unicorn contexts -
unicorn/no-single-promise-in-promise-methodsDisallow passing single-element arrays to
Promisemethods.: error in All Unicorn contexts -
unicorn/no-subtraction-comparisonPrefer comparing values directly over subtracting and comparing to
0.: error in All Unicorn contexts -
unicorn/no-this-assignmentDisallow assigning
thisto a variable.: error in All Unicorn contexts -
unicorn/no-this-outside-of-classDisallow
thisoutside of classes.: error in All Unicorn contexts