This rule raises an issue when a class decorated with @Pipe does not implement the PipeTransform interface.

Why is this an issue?

Angular Pipes are expected to implement the PipeTransform interface to ensure type safety and follow Angular conventions.

The PipeTransform interface defines the contract that all pipes must follow, requiring a transform method with proper typing. Without this interface:

Implementing PipeTransform makes your code more robust and follows Angular’s recommended patterns.

What is the potential impact?

Without implementing PipeTransform, pipes may have incorrect method signatures leading to runtime errors. The code also becomes less maintainable and loses TypeScript’s type checking benefits.

How to fix?

Add implements PipeTransform to your pipe class and import the interface from @angular/core.

Non-compliant code example

@Pipe({ name: 'test' })
class Test { // Noncompliant
  transform(value: string) {}
}

Compliant code example

import { PipeTransform } from '@angular/core';

@Pipe({ name: 'test' })
class Test implements PipeTransform {
  transform(value: string) {}
}

Documentation