Unicorn (JS plugin)
80 rules @sarj/eslint-plugin@19.18.0
Complete effective rule inventory.
Rules
No enabled Unicorn (JS plugin) rules match this search.
-
unicorn-js/no-late-event-controlDisallow event-control method calls after the synchronous event dispatch has finished.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-loop-iterable-mutationDisallow mutating a loop iterable during iteration.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-mismatched-map-keyDisallow checking a Map key before accessing a different key.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-missing-local-resourceDisallow references to missing local resources.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-multiple-promise-resolver-callsDisallow calling Promise executor resolver functions more than once on the same execution path.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-object-methods-with-collectionsDisallow
Objectmethods withMaporSet.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-prevent-default-in-passive-listenerDisallow ineffective
preventDefault()calls in passive event listeners.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-redundant-comparisonDisallow comparisons made redundant by an equality check in the same logical AND.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-return-array-pushDisallow using the return value of
Array#push()andArray#unshift().: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-selector-as-dom-nameDisallow selector syntax in DOM names.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-shorthand-property-overridesDisallow shorthand properties that override related longhand properties.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-subtraction-comparisonPrefer comparing values directly over subtracting and comparing to
0.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-uncalled-methodDisallow referencing methods without calling them.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-array-flat-mapDisallow unnecessary use of
Array#flatMap().: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-default-argumentsDisallow arguments that match their parameter defaults.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-fetch-optionsDisallow unnecessary options in
fetch()andnew Request().: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-global-thisDisallow unnecessary
globalThisreferences.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-nested-ternaryDisallow unnecessary nested ternary expressions.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-parametersDisallow parameters that receive the same value at every call.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-polyfillsEnforce the use of built-in methods instead of unnecessary polyfills.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-spliceDisallow
Array#splice()when simpler alternatives exist.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unnecessary-string-trimDisallow
String#trim()beforeString#startsWith()orString#endsWith().: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unsafe-buffer-conversionPrevent unsafe use of ArrayBuffer view
.buffer.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unsafe-dom-htmlDisallow unsafe DOM HTML APIs.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unsafe-json-serializationDisallow known values that JSON serialization cannot represent faithfully.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unsafe-sqlite-interpolationDisallow interpolation into SQL strings passed to Node’s
node:sqliteAPIs.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unsafe-string-replacementDisallow non-literal replacement values in
String#replace()andString#replaceAll().: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unused-builtin-method-returnDisallow ignoring the return value of selected built-in methods.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-unused-iterator-helperDisallow discarding lazy iterator helpers.
: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-url-in-search-paramsDisallow passing full URLs to
URLSearchParams.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-useless-boolean-castDisallow unnecessary
Boolean()casts in array predicate callbacks.: error in All Unicorn (JS plugin) contexts -
unicorn-js/no-useless-compound-assignmentDisallow useless compound assignments such as
x += 0.: error in All Unicorn (JS plugin) contexts