تخطَّ إلى المحتوى

Repeated string literal (ARCH3207)

هذا المحتوى غير متوفر بلغتك بعد.

Key typescript.quality.repeated-string-literal · Severity info · Category quality

Flags a string literal of five or more characters used four or more times in one class, or in a module outside its classes. A value repeated by hand is changed in three places out of four one day. Types, module specifiers, object keys and values (configuration: Intl options, state machines, table rows), JSX attribute values, typeof tags, translation keys, case labels, decorator arguments, log calls, a const’s own value and test code are not counted.

if (status === "awaiting-payment") notify();
return status === "awaiting-payment" ? "awaiting-payment" : next;
filters.push("awaiting-payment");
export const AWAITING_PAYMENT = "awaiting-payment";
if (status === AWAITING_PAYMENT) notify();
filters.push(AWAITING_PAYMENT);