Update dependency io.nlopez.compose.rules:ktlint to v0.3.13 (#4169)

* Update dependency io.nlopez.compose.rules:ktlint to v0.3.13

* TODO

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
renovate[bot]
2024-04-01 13:19:53 +00:00
committed by GitHub
parent 1000b0c216
commit 8afdc6f28e
4 changed files with 6 additions and 2 deletions

View File

@@ -428,7 +428,7 @@ spotless {
kotlin {
target("lawnchair/src/**/*.kt")
ktlint().customRuleSets([
"io.nlopez.compose.rules:ktlint:0.3.12",
"io.nlopez.compose.rules:ktlint:0.3.13",
]).editorConfigOverride([
"ktlint_compose_modifier-missing-check": "disabled",
"ktlint_compose_compositionlocal-allowlist": "disabled",

View File

@@ -104,7 +104,7 @@ object PlaceholderDefaults {
* on/off screen. The boolean parameter defined for the transition is [visible].
*/
// TODO: need to migrate to Modifier.Node, see https://mrmans0n.github.io/compose-rules/rules/#avoid-modifier-extension-factory-functions
@Suppress("ktlint:compose:modifier-composable-check")
@Suppress("ktlint:compose:modifier-composable-check", "ktlint:compose:modifier-composed-check")
@Composable
fun Modifier.placeholder(
visible: Boolean,

View File

@@ -17,6 +17,8 @@ import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.max
// TODO: https://mrmans0n.github.io/compose-rules/rules/#avoid-modifier-extension-factory-functions
@Suppress("ktlint:compose:modifier-composed-check")
fun Modifier.navigationBarsOrDisplayCutoutPadding(): Modifier = composed {
val sides = WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom
val navigationBars = WindowInsets.navigationBars.only(sides).asPaddingValues()

View File

@@ -54,6 +54,8 @@ fun Modifier.smartBorder(border: BorderStroke, shape: Shape = RectangleShape) =
fun Modifier.smartBorder(width: Dp, color: Color, shape: Shape = RectangleShape) =
smartBorder(width, SolidColor(color), shape)
// TODO: https://mrmans0n.github.io/compose-rules/rules/#avoid-modifier-extension-factory-functions
@Suppress("ktlint:compose:modifier-composed-check")
fun Modifier.smartBorder(
width: Dp,
brush: Brush,