Avoid @ts-<directive> comments

Metadata

ID: typescript-code-style/ban-ts-comment

Language: TypeScript

Severity: Notice

Category: Best Practices

Description

Correct your types instead of disabling TypeScript.

Non-Compliant Code Examples

// @ts-expect-error
// @ts-ignore
// @ts-nocheck
// @ts-check

Compliant Code Examples

// just a comment containing @ts-expect-error somewhere
// just a comment containing @ts-ignore somewhere
// just a comment containing @ts-nocheck somewhere
// just a comment containing @ts-check somewhere