Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Jul 7, 2024
1 parent 5627aa6 commit 3dcb5c7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[**/generated/**/*]
ktlint = disabled

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import kotlinx.datetime.number

@Immutable
data class YearMonth(val year: Int, val month: Month) : Comparable<YearMonth>, JvmSerializable {

constructor(year: Int, monthNumber: Int) :
this(year = year, month = Month(monthNumber))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ actual fun firstDayOfWeekFromLocale(locale: Locale): DayOfWeek {
return try {
val firstDay = jsFirstDayFromTag(locale.toLanguageTag())
daysOfWeek(firstDayOfWeek = DayOfWeek.MONDAY)[firstDay - 1]
} catch (e: Exception) { // Unavailable on Firefox
// Unavailable on Firefox
} catch (e: Exception) {
firstDayFromMap(locale)
}
}
Expand Down
4 changes: 2 additions & 2 deletions compose-multiplatform/sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ kotlin {
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation("com.kizitonwose.calendar:compose-multiplatform:2.6.0-alpha01")
// implementation(project(":compose-multiplatform:library"))
// implementation("com.kizitonwose.calendar:compose-multiplatform:2.6.0-alpha02")
implementation(project(":compose-multiplatform:library"))
implementation(libs.jetbrains.compose.navigation)
}
val nonJvmMain by creating {
Expand Down
2 changes: 0 additions & 2 deletions compose-multiplatform/sample/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ private fun AppNavHost(
}
}


@OptIn(ExperimentalMaterial3Api::class)
private val blueToolbar
@Composable
Expand All @@ -190,4 +189,3 @@ private val whiteToolbar
containerColor = Color.White,
titleContentColor = Color.Black,
)

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("ktlint:standard:backing-property-naming")

import androidx.compose.foundation.Image
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.materialIcon
Expand Down
12 changes: 0 additions & 12 deletions compose-multiplatform/sample/src/commonMain/kotlin/Example3Page.kt
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,6 @@ private fun AirportInformation(airport: Flight.Airport, isDeparture: Boolean) {
}
}

// The default dark them ripple is too bright so we tone it down.
//private val Example3RippleConfiguration = RippleConfiguration(
// color = Color.Gray,
// // Copied from RippleTheme#DarkThemeRippleAlpha
// rippleAlpha = RippleAlpha(
// pressedAlpha = 0.10f,
// focusedAlpha = 0.12f,
// draggedAlpha = 0.08f,
// hoveredAlpha = 0.04f,
// ),
//)

@Preview
@Composable
private fun Example3Preview() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import androidx.compose.ui.window.ComposeUIViewController

fun MainViewController() = ComposeUIViewController { App() }
@Suppress("FunctionName")
fun MainViewController() = ComposeUIViewController { App() }
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fun main() {
ComposeViewport(document.body!!) {
App()
}
}
}

0 comments on commit 3dcb5c7

Please sign in to comment.