Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 486 Bytes

README.md

File metadata and controls

44 lines (34 loc) · 486 Bytes

at-if-no-null

Check for equality to null is unnecessarily explicit since null is falsey in Sass.

a {
    @if $x == null {}
/**         ↑     ↑
 * == or != null is unncessary */
}

Options

true

true

The following patterns are considered warnings:

a {
    @if $x == null {}
}
a {
    @if $x != null {}
}

The following patterns are not considered warnings:

a {
    @if $x {}
}
a {
    @if not $x {}
}