Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 624 Bytes

require-deprecation-reason.md

File metadata and controls

27 lines (19 loc) · 624 Bytes

Require all deprecation directives to specify a reason

Deprecation reason will document your decisions for others.

Rule Details

This rule will require all @deprecated directives to specify deprecation reason

Examples of incorrect code for this rule:

# eslint @graphql-eslint/require-deprecation-reason: "error"
...
  name: String @deprecated
...

Examples of correct code for this rule:

# eslint @graphql-eslint/require-deprecation-reason: "error"
...
  name: String @depecated(reason: "Removing in 2 releases. Use fullname instead")
...

This rule doesn't have any options