Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 847 Bytes

ban-ts-ignore.md

File metadata and controls

37 lines (24 loc) · 847 Bytes

Bans “// @ts-ignore” comments from being used (ban-ts-ignore)

Suppressing Typescript Compiler Errors can be hard to discover.

Rule Details

Does not allow the use of // @ts-ignore comments.

The following patterns are considered warnings:

if (false) {
  // @ts-ignore: Unreachable code error
  console.log('hello');
}

The following patterns are not warnings:

if (false) {
  // Compiler warns about unreachable code error
  console.log('hello');
}

When Not To Use It

If you are sure, compiler errors won't affect functionality and you need to disable them.

Further Reading

Compatibility