facebook pixelCodiga Analysis TypeScript Rules, severity warning
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/camelcase

Code style
Warning

Detect all values and method definitions that do not use camelCase, they should.

Learn more

@typescript-eslint/class-name-casing

Code style
Warning

Detect all classes and interfaces that do not follow the PascalCased name convention

@typescript-eslint/explicit-module-boundary-types

Code style
Warning

Detect if not all function types for arguments and return values are specified in the function signature

@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)

@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-unused-vars

Safety
Warning

Detect all defined variables (e.g "var foo = true") that are not being used somewhere else

@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.

@typescript-eslint/triple-slash-reference

Code style
Warning

Detect any triple slash reference definitions in the top of the file, they should be replaced by the import style (e.g replace "/// <reference path="foo" />" by "import * as foo from 'foo';")

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.

import/no-unassigned-import

Error prone
Warning

Aims to remove modules with side-effects by reporting when a module is imported but not assigned.

import/prefer-default-export

Code style
Warning

When there is only a single export from a module, prefer using default export over named export.

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

@typescript-eslint/no-empty-interface

Design
Warning

An interface declaring no members is equivalent to its supertype.

@typescript-eslint/no-unnecessary-type-constraint

Design
Warning

Disallows unnecessary constraints on generic types

@next/next/no-page-custom-font

Performance
Warning

The custom font you're adding was added to a separate component within Document - this disables automatic font optimization.

@next/next/next-script-for-ga

Safety
Warning

Use the `next/script` component for loading third party scripts

@next/next/google-font-display

Best practice
Warning

Display parameter is missing

import/no-anonymous-default-export

Error prone
Warning

Assign object to a variable before exporting as module default

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.

vue/multi-word-component-names

Code style
Warning

Component nam should always be multi-word

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`

vue/component-definition-name-casing

Code style
Warning

Enforce specific casing for component definition name