@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
Detect any empty methods, as in methods that do not have any logic
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
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.
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.
Check max number of statements for a function
Disallow empty destructuring patterns
Disallow assignment to native objects or read-only global variables
Disallow variable redeclaration
Detects self assignments as they have no effect, so probably those are an error due to incomplete refactoring.
Disallow unused labels. Labels 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
React: Detects when rules of hooks are not being followed
React: Disallow color literals in styles
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: This rules requires that you accompany target='\_blank' attributes with rel='noreferrer'.
React: Prevent passing of children as props. Children should always be actual children, not passed in as a prop.
React: Prevent usage of deprecated methods
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 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
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
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.