facebook pixelCodiga Analysis TypeScript Rules
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
      Medium

      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
      Medium

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

      @typescript-eslint/no-var-requires

      Best practice
      Medium

      Disallows the use of require statements except in import statements.

      @typescript-eslint/prefer-namespace-keyword

      Best practice
      Medium

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

      fp/no-mutating-methods

      Best practice
      Medium

      Forbid the use of mutating methods

      import/no-default-export

      Best practice
      Medium

      Prohibit default exports.

      import/no-duplicates

      Best practice
      Medium

      Detect any duplicate imports

      import/no-extraneous-dependencies

      Best practice
      Medium

      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
      Medium

      Suggest using jest.spyOn()

      react/no-unused-prop-types

      Best practice
      Medium

      Prevent definitions of unused propTypes

      no-unsafe-optional-chaining

      Best practice
      Medium

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

      @next/next/google-font-display

      Best practice
      Medium

      Display parameter is missing

      no-cond-assign

      Best practice
      Medium

      Expected a conditional expression and instead saw an assignment

      @next/next/no-head-element

      Best practice
      Medium

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