facebook pixelCodiga Analysis TypeScript Rules, severity warning , category best practice
BACK TO LIST

TypeScript rules

The Codiga Static Analysis engine checks TypeScript 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.

@typescript-eslint/no-explicit-any

Best practice
Warning

Detect any explicit "any" type, it should be replaced by another specific valid type (e.g string, number, boolean)

Learn more

@typescript-eslint/no-non-null-assertion

Best practice
Warning

Detect all non-null assertions as they cancel the benefits of strict null-checking mode

@typescript-eslint/no-var-requires

Best practice
Warning

Disallows the use of require statements except in import statements.

@typescript-eslint/prefer-namespace-keyword

Best practice
Warning

Use 'namespace' instead of 'module' to declare custom TypeScript modules.

fp/no-mutating-methods

Best practice
Warning

Forbid the use of mutating methods

import/no-default-export

Best practice
Warning

Prohibit default exports.

import/no-duplicates

Best practice
Warning

Detect any duplicate imports

import/no-extraneous-dependencies

Best practice
Warning

Forbid the import of external modules that are not declared in the package.json's dependencies, devDependencies, optionalDependencies, peerDependencies, or bundledDependencies.

jest/prefer-spy-on

Best practice
Warning

Suggest using jest.spyOn()

react/no-unused-prop-types

Best practice
Warning

Prevent definitions of unused propTypes

no-unsafe-optional-chaining

Best practice
Warning

Disallow use of optional chaining in contexts where the undefined value is not allowed

@next/next/google-font-display

Best practice
Warning

Display parameter is missing

no-cond-assign

Best practice
Warning

Expected a conditional expression and instead saw an assignment

@next/next/no-head-element

Best practice
Warning

Do not use <head>. Use Head from 'next/head' instead.

no-ex-assign

Best practice
Warning

Do not assign to the exception parameter.

@next/next/no-server-import-in-page

Best practice
Warning

Prevent usage of next/server outside of middleware.js.

@next/next/no-before-interactive-script-outside-document

Best practice
Warning

`next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`