@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
Make code more readable and explicit about who can use which properties
Detect any empty methods, as in methods that do not have any logic
Detect all non-null assertions as they cancel the benefits of strict null-checking mode
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
Enforce template literal expressions to be of string type
This rule enables linting your code for browser compatibility.
Constructors of derived classes must call super()
Unnecessary wait for cy.request()
Disallow unused eslint-disable comments. Make sure all your rules are defined and are used correctly.
Ensure consistent use of file extension within the import path
Reports require([string]) function calls. Will not report if >1 argument, or single argument is not a literal string.
Checks every call to require() that uses expressions for the module name argument.
Ensures an imported module can be resolved to a module on the local filesystem, as defined by standard Node require.resolve behavior.
Reports modules without any exports, individual exports not being statically imported or required from other modules in the same project or dynamic imports are supported if argument is a literal string
Forbid Webpack loader syntax in imports.
Enforce a convention in the order of require() / import statements.
Jest: Ensure that there is at least one expect call made in a test.
Jest: This rule prevents the use of expect in conditional blocks, such as ifs & catchs.
Make sure the HTML <a> has a valid href value and can be used to navigate in a browser, make sure all attributes are specified correctly.
Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress
<iframe> elements must have a unique title property to indicate its content to the user.
Accessibility: Enforce that a label tag has a text label and an associated control.
Accessibility: Enforce that a label tag has a text label and an associated control.
Accessibility: Provide a caption for your media. Providing captions for media is essential for deaf users to follow along.
Accessibility: enforce onmouseover/onmouseout are accompanied by onfocus/onblur.
Accessibility: disallow interactions in no interactive elements.
Tab key navigation should be limited to elements on the page that can be interacted with.
Disallow interactions in static elements. Static HTML elements do not have semantic meaning.
Check max number of statements for a function
Disallow hooks for a single test or test suite
Disallow setup in describe blocks
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
Find duplicate string
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
Using complete words results in more readable code. Not everyone knows all your abbreviations.
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.