require-lint-suppression-reason
WarningWarningWarningGive a reason for each suppression: #[allow], eslint-disable-next-line, @ts-expect-error or // ignore:.
#[allow(clippy::cast_possible_wrap)]fn run() {}#[expect(unused_variables)]fn run() {}#[allow(clippy::cast_possible_wrap, reason = "limit is capped at 100")]fn run() {}// The limit is validated by GraphQL and never exceeds 100#[allow(clippy::cast_possible_wrap)]fn run() {}// eslint-disable-next-line no-consoleconsole.warn("ready");// @ts-ignorecall(1);// @ts-expect-errorcall(1);// eslint-disable-next-line no-console -- startup bannerconsole.warn("ready");// @ts-expect-error the library types miss this overloadcall(1);// The generated client lacks this field// @ts-expect-errorcall(1);void run() { // ignore: deprecated_member_use call();}void run() { // The replacement API is not available on the current Flutter version // ignore: deprecated_member_use call();}How to fix
Add reason = "..." to the attribute, or write the reason in a comment on the line above. Put it on the smallest item that needs it.
How to fix
Write the reason after the directive, as in // eslint-disable-next-line no-console -- startup banner or // @ts-expect-error the generated types miss this field, or in a comment on the line above.
How to fix
Write the reason in a comment on the line above // ignore:.