useDeprecatedDate
このコンテンツはまだ日本語訳がありません。
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/useDeprecatedDate
- This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "useDeprecatedDate": "error" } } }}
Description
Section titled “Description”Require the @deprecated
directive to specify a deletion date.
Suggests removing deprecated code when the due date has been passed.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”query { member @deprecated(reason: "Use `members` instead") { id }}
code-block.graphql:2:10 lint/nursery/useDeprecatedDate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ The directive @deprecated
should have a deletionDate
argument.
1 │ query {
> 2 │ member @deprecated(reason: “Use members
instead”) {
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ id
4 │ }
ℹ Add a deletionDate
argument to the directive.
query { member @deprecated(reason: "Use `members` instead", deletionDate: "2099-12-25") { id }}
Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.