pub struct RequireImgAltRule { /* private fields */ }Expand description
Flags <img> elements that are missing an alt attribute.
Walks the AST for jsx_self_closing_element and jsx_opening_element
nodes with tag name img and checks that at least one child
jsx_attribute has the name alt.
Implementations§
Source§impl RequireImgAltRule
impl RequireImgAltRule
pub fn new(config: &RuleConfig) -> Result<Self, RuleBuildError>
Trait Implementations§
Source§impl Rule for RequireImgAltRule
impl Rule for RequireImgAltRule
Auto Trait Implementations§
impl Freeze for RequireImgAltRule
impl RefUnwindSafe for RequireImgAltRule
impl Send for RequireImgAltRule
impl Sync for RequireImgAltRule
impl Unpin for RequireImgAltRule
impl UnsafeUnpin for RequireImgAltRule
impl UnwindSafe for RequireImgAltRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more