facebook pixelCodiga Analysis JavaScript Rules, severity error , category error prone
BACK TO LIST

JavaScript rules

The Codiga Static Analysis engine checks JavaScript code and supports many popular libraries. If you are using React, NextJS, Vue or Angular: the engine will flag any issue in your codebase. Automate your code reviews with Codiga and merge with confidence.

for-direction

Error prone
Error

Enforce "for" loop update clause moving the counter in the right direction.

Learn more

getter-return

Error prone
Error

Enforces that a return statement is present in property getters

no-compare-neg-zero

Error prone
Error

Detect the use of operator (e.g <=, <, ===, etc) to compare against -0.

no-control-regex

Error prone
Error

Control characters are special, invisible characters in the ASCII range 0-31. These characters are rarely used in JavaScript strings so a regular expression containing these characters is most likely a mistake.

no-dupe-else-if

Error prone
Error

Disallow duplicate conditions in if-else-if chains

no-dupe-keys

Error prone
Error

Disallow duplicate keys in object literals

no-duplicate-case

Error prone
Error

If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.

no-func-assign

Error prone
Error

Disallow reassigning function declarations

no-inner-declarations

Error prone
Error

Disallow variable or function declarations in nested blocks

no-irregular-whitespace

Error prone
Error

Irregular whitespace not allowed.

no-misleading-character-class

Error prone
Error

Disallow characters which are made with multiple code points in character class syntax

no-prototype-builtins

Error prone
Error

Disallow use of Object.prototypes builtins directly

no-regex-spaces

Error prone
Error

Disallow multiple spaces in regular expression literals

no-setter-return

Error prone
Error

Setter cannot return a value.

no-unexpected-multiline

Error prone
Error

Disallow confusing multiline expressions

no-unreachable

Error prone
Error

Disallow unreachable code after return, throw, continue, and break statements

no-unsafe-finally

Error prone
Error

Disallow control flow statements in finally blocks

no-unsafe-negation

Error prone
Error

Disallow negating the left operand of relational operators

node/no-missing-require

Error prone
Error

Disallow require() expressions which import non-existence modules

react/jsx-key

Error prone
Error

React: Warn if an element that likely requires a key prop--namely, one present in an array literal or an arrow function expression.

react/jsx-no-duplicate-props

Error prone
Error

React: No duplicate props allowed

react/jsx-no-undef

Error prone
Error

React: Detects potential ReferenceErrors resulting from misspellings or missing components.

react/no-direct-mutation-state

Error prone
Error

React: NEVER mutate this.state directly, as calling setState() afterwards may replace the mutation you made. Treat this.state as if it were immutable.

react/no-unescaped-entities

Error prone
Error

React: Prevent invalid characters from appearing in markup

react/no-unknown-property

Error prone
Error

React: Prevent usage of unknown DOM property

valid-typeof

Error prone
Error

Enforce comparing typeof expressions against valid strings