@typescript-eslint/ban-ts-comment
Detect any '@ts-<directive>' comment as it can reduce the effectiveness of TypeScript overall.
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.
Detect any '@ts-<directive>' comment as it can reduce the effectiveness of TypeScript overall.
Bans specific types and can suggest alternatives (such as String).
Ensure that the values returned from functions are of the expected type
Ensure that the values returned from a module are of the expected type
Enforces naming conventions for everything across a codebase, in the settings verify if the naming-convention is camelCase, snake_case, etc.
Detect any empty methods, as in methods that do not have any logic
Disallows assigning any to variables and properties as it creates a potential safety hole, and source of bugs in your codebase.
Disallows calling an any type value as it creates a potential safety hole, and source of bugs in your codebase.
Disallows member access on any typed variables as it creates a potential safety hole, and source of bugs in your codebase.
Disallow unused expressions. An unused expression which has no effect on the state of the program indicates a logic error.
Disallow unused variables. Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring
Disallows the use of require statements except in import statements
Warns when a method is used outside of a method call.
This rule enables linting your code for browser compatibility.
Constructors of derived classes must call super()
Disallow unused eslint-disable comments. Make sure all your rules are defined and are used correctly.
Warns against weak type annotations any, Object and Function.
Enforce "for" loop update clause moving the counter in the right direction.
Enforces that a return statement is present in property getters
Warn if a module could be mistakenly parsed as a script by a consumer leveraging Unambiguous JavaScript Grammar to determine correct parsing goal.
Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress
Disallow interactions in static elements. Static HTML elements do not have semantic meaning.
Enforce consistent spacing between keys and values in object literal properties
Check max number of statements for a function
Definition for rule 'mocha/prefer-arrow-callback' was not found.
RegistrationForm' is a class.
Detect the use of operator (e.g <=, <, ===, etc) to compare against -0.
Disallows assigning values to const as they're immutable.
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.
Disallow duplicate name in class members
Disallow duplicate conditions in if-else-if chains
Disallow duplicate keys in object literals
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.
Disallow empty destructuring patterns
Disallow reassigning function declarations
Disallow assignment to native objects or read-only global variables
Disallow variable or function declarations in nested blocks
Irregular whitespace not allowed.
Disallow characters which are made with multiple code points in character class syntax
Disallow use of Object.prototypes builtins directly
Disallow variable redeclaration
Disallow multiple spaces in regular expression literals
Detects self assignments as they have no effect, so probably those are an error due to incomplete refactoring.
Setter cannot return a value.
Disallow shadowing of restricted names
Disallow confusing multiline expressions
Disallow unreachable code after return, throw, continue, and break statements
Disallow control flow statements in finally blocks
Disallow negating the left operand of relational operators
Disallow unused labels. Labels that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring.
Disallow unused variables. Variables that are declared and not used anywhere in the code are most likely an error due to incomplete refactoring
Disallow unnecessary catch clauses
Reports unnecessary escapes, as escaping non-special characters in strings, template literals, and regular expressions doesn't have any effect.
Disallow deprecated APIs
Disallow require() expressions which import non-existence modules
Ensure that each time a then() is applied to a promise, a catch() is applied as well. Exceptions are made if you are returning that promise.
Use async/await style for managing concurrency instead of .then()
React: Detects when rules of hooks are not being followed
React: Disallow internal logging when running in production
React: Disallow color literals in styles
React: Styles should be defined in css blocks and not as inline of the web component or element
React: Enforce consistent usage of destructuring assignment of props, state, and context
Prevent missing displayName in a React component definition
React: By default this rule prevents vague prop types with more specific alternatives available (any, array, object), but any prop type can be disabled if desired.
React: Warn if an element that likely requires a key prop--namely, one present in an array literal or an arrow function expression.
React: No duplicate props allowed
React: This rules requires that you accompany target='\_blank' attributes with rel='noreferrer'.
React: Detects potential ReferenceErrors resulting from misspellings or missing components.
React: Prevent usage of Array index in keys
React: Prevent passing of children as props. Children should always be actual children, not passed in as a prop.
React: Prevent usage of dangerous JSX properties
React: Prevent usage of deprecated methods
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: Prevent usage of findDOMNode. Facebook will eventually deprecate findDOMNode as it blocks certain improvements in React in the future.
React: Prevent usage of the return value of ReactDOM.render
React: Prevent using string references
React: Prevent invalid characters from appearing in markup
React: Prevent usage of unknown DOM property
React: Prevent missing props validation in a React component definition
React: Enforce a defaultProps definition for every prop that is not a required prop
React: Enforce ES5 or ES6 class for returning value in render function
React: Enforce component methods order
React: Enforce style prop value being an object
Disallow generator functions that do not have yield
Detects RegExp(variable), which might allow an attacker to DOS your server with a long-running regular expression.
When two functions have the same implementation, either it was a mistake - something else was intended - or the duplication was intentional, but may be confusing to maintainers.
When invoking a callback function which uses the Node.js error-first callback pattern, all of your errors should either use the Error class or a subclass of it. It is also acceptable to use undefined or null if there is no error.
Use destructured variables over properties
Disallow the use of Math.pow in favor of the ** operator
Enforce comparing typeof expressions against valid strings
Vue: Disallow overwriting reserved keys in Vue
Vue: Disallow side effects in computed properties
Use the new keyword when throwing an error
We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.