Releases: slackhq/compose-lints
Releases · slackhq/compose-lints
1.3.1
1.3.0
- New: Implement
ModifierComposed
check to lint against use ofModifier.composed
, which is no longer recommended in favor of the newModifier.Node
API. - New: Implement
ComposeUnstableReceiver
check to warn when composable extension functions or composables instance functions have unstable receivers/containing classes. - New: Check for property accessors with composition locals.
- Enhancement: The
ComposeComposableModifier
message now recommends the newModifier.Node
API. - Enhancement: Make lints significantly more robust to edge cases like typealiases, import aliases, parentheses, fully-qualified references, and whitespace. Our tests now cover all these cases.
- Enhancement: Update
@Preview
detection to also detect Compose Desktop's own@Preview
annotation. - Enhancement: Improve the
ComposeParameterOrder
check to only lint the parameter list and add a quickfix. - Enhancement: Add support for checking for loops in multiple content emitters.
- Fix: Fix allowed names config for Unit-returning functions.
- Fix: Ignore context receivers in multiple content emissions lint.
- Fix: Allow nullable types for trailing lambdas in
ComposeParameterOrder
. - Fix: Best-effort work around name mangling when comparing name in M2ApiDetector's allow list.
- Fix: Fix
ComposePreviewPublic
to always just require private, remove preview parameter configuration. - Docs: Improve docs for
ComposeContentEmitterReturningValues
- Build against lint-api
31.2.2
. - Test against lint-api
31.4.0-alpha06
. - Raise Kotlin apiVersion/languageVersion to
1.9.0
.
Special thanks to @jzbrooks, @joeMalebe, and @dellisd for contributing to this release!
What's Changed
- Update dependency Pygments to v2.15.1 by @slack-oss-bot in #108
- Update dependency tornado to v6.3.1 by @slack-oss-bot in #111
- Update dependency gradle to v8.1.1 by @slack-oss-bot in #110
- Update dependency mkdocs-material to v9.1.7 by @slack-oss-bot in #112
- Update dependency termcolor to v2.3.0 by @slack-oss-bot in #113
- Update dependency mkdocs-material to v9.1.8 by @slack-oss-bot in #114
- Update plugin ksp to v1.8.21-1.0.11 by @slack-oss-bot in #115
- Update lint-latest to v31.2.x alphas by @slack-oss-bot in #109
- Update dependency com.facebook:ktfmt to v0.44 by @slack-oss-bot in #116
- Update dependency mkdocs to v1.4.3 by @slack-oss-bot in #119
- Update dependency mkdocs-material to v9.1.9 by @slack-oss-bot in #120
- Update dependency com.google.auto.service:auto-service-annotations to v1.1.0 by @slack-oss-bot in #126
- Update plugin detekt to v1.23.0 by @slack-oss-bot in #127
- Update plugin spotless to v6.19.0 by @slack-oss-bot in #128
- Update dependency mkdocs-macros-plugin to v1 by @slack-oss-bot in #130
- Update dependency MarkupSafe to v2.1.3 by @slack-oss-bot in #131
- Update plugin dokka to v1.8.20 by @slack-oss-bot in #132
- Update dependency pymdown-extensions to v10 by @slack-oss-bot in #124
- Update dependency com.android.tools.lint:lint-api to v31.0.2 by @slack-oss-bot in #117
- Update dependency mkdocs-material to v9.1.15 by @slack-oss-bot in #122
- Update plugin lint to v8.0.2 by @slack-oss-bot in #118
- Update dependency tornado to v6.3.2 by @slack-oss-bot in #123
- Allow nullable types for trailing lambdas in ComposeParameterOrder by @mrmans0n in #134
- Ignore context receivers in multiple content emissions lint by @mrmans0n in #135
- Update dependency com.google.auto.service:auto-service-annotations to v1.1.1 by @slack-oss-bot in #136
- Fix allowed names for Unit-returning functions by @dellisd in #139
- Update plugin ksp to v1.8.22-1.0.11 by @slack-oss-bot in #133
- Update lint-latest to v31.2.0-alpha09 by @slack-oss-bot in #121
- Update dependency mkdocs-material to v9.1.17 by @slack-oss-bot in #138
- Update lint-latest to v31.2.0-alpha10 by @slack-oss-bot in #140
- Update dependency click to v8.1.4 by @slack-oss-bot in #144
- Update dependency mkdocs-material to v9.1.18 by @slack-oss-bot in #143
- Update lint-latest to v31.2.0-alpha11 by @slack-oss-bot in #145
- Update dependency gradle to v8.2 by @slack-oss-bot in #141
- Update plugin mavenPublish to v0.25.3 by @slack-oss-bot in #142
- Update dependency dev.zacsweers.autoservice:auto-service-ksp to v1.1.0 by @slack-oss-bot in #147
- Update lint-latest to v31.2.0-alpha12 by @slack-oss-bot in #150
- Update dependency mkdocs-macros-plugin to v1.0.2 by @slack-oss-bot in #151
- Update dependency gradle to v8.2.1 by @slack-oss-bot in #149
- Update dependency PyYAML to v6.0.1 by @slack-oss-bot in #154
- Update plugin spotless to v6.20.0 by @slack-oss-bot in #155
- Update dependency mkdocs-material to v9.1.19 by @slack-oss-bot in #156
- Update lint-latest to v31.2.0-alpha13 by @slack-oss-bot in #157
- Slight Improvement for rules documentation by @joeMalebe in #170
- Update dependency click to v8.1.7 by @slack-oss-bot in #152
- Update dependency pymdown-extensions to v10.3 by @slack-oss-bot in #153
- Update dependency Markdown to v3.4.4 by @slack-oss-bot in #158
- Update dependency mkdocs-material to v9.4.2 by @slack-oss-bot in #160
- Update dependency com.android.tools.lint:lint-api to v31.1.1 by @slack-oss-bot in #161
- Update dependency mkdocs to v1.5.3 by @slack-oss-bot in #162
- Update plugin lint to v8.1.1 by @slack-oss-bot in #163
- Update plugin detekt to v1.23.1 by @slack-oss-bot in #164
- Kotlin 1.9.10 + gradle 8.3 and a couple other things by @slack-oss-bot in #146
- Update dependency com.android.tools.lint:lint-api to v31.1.2 by @slack-oss-bot in #174
- Update dependency mkdocs-macros-plugin to v1.0.4 by @slack-oss-bot in #175
- Update lint-latest to v31.3.0-alpha06 + fix baselined issues by @slack-oss-bot in #159
- Update actions/checkout action to v4 by @slack-oss-bot in #181
- Update dependency tornado to v6.3.3 by @slack-oss-bot in #176
- Update dependency lunr to v0.7.0.post1 by @slack-oss-bot in #178
- Update dependency mkdocs-material-extensions to v1.2 by @slack-oss-bot in #179
- Update plugin spotless to v6.22.0 by @slack-oss-bot in #180
- Update dependency Pygments to v2.16.1 by @slack-oss-bot in #177
- Update lint-latest to v31.3.0-alpha12 by @slack-oss-bot in #184
- Update dependency Markdown to v3.5.1 by @slack-oss-bot in #185
- Update plugin dokka to v1.9.10 by @slack-oss-bot in #186
- Update dependency org.jetbrains.kotlin.jvm to v1.9.20 by @slack-oss-bot in #190
- Update dependency mkdocs-material to v9.4.7 by @slack-oss-bot in #182
- Update dependency gradle to v8.4 by @slack-oss-bot in #183
- Update dependency pymdown-extensions to v10.3.1 by @slack-oss-bot in #188
- Update plugin detekt to v1.23.3 by @slack-oss-bot in #191
- Update dependency mkdocs-material-extensions to v1.3 by @slack-oss-bot in https:...
1.2.0
- Fix: Only run
ComposeM2Api
checks on Kotlin files. - Update lint current and min API to 14, aka AGP 8.0.0+.
What's Changed
- Update plugin spotless to v6.17.0 by @slack-oss-bot in #83
- Add visibility-threshold to ComposeModifierMissing rule by @mrmans0n in #86
- Update dependency mkdocs-material to v9.1.3 by @slack-oss-bot in #82
- Update lint-latest to v31.1.0-alpha09 by @slack-oss-bot in #85
- Update lint-latest to v31.1.0-alpha10 by @slack-oss-bot in #88
- Update plugin mavenPublish to v0.25.1 by @slack-oss-bot in #90
- Update dependency Markdown to v3.4.3 by @slack-oss-bot in #33
- Update dependency mkdocs-material to v9.1.4 by @slack-oss-bot in #92
- Update lint-latest to v31.1.0-alpha11 by @slack-oss-bot in #93
- Update dependency mkdocs-material to v9.1.5 by @slack-oss-bot in #94
- Update dependency com.android.tools.lint:lint-api to v31 by @slack-oss-bot in #101
- Update plugin lint to v8 by @slack-oss-bot in #102
- Update plugin mavenPublish to v0.25.2 by @slack-oss-bot in #103
- Update dependency mkdocs-material to v9.1.6 by @slack-oss-bot in #97
- Update dependency pymdown-extensions to v9.11 by @slack-oss-bot in #98
- Update dependency gradle to v8.1 by @slack-oss-bot in #100
- Update plugin spotless to v6.18.0 by @slack-oss-bot in #96
- Update dependency Pygments to v2.15.0 by @slack-oss-bot in #99
- Update dependency tornado to v6.3 by @slack-oss-bot in #105
- Update plugin ksp to v1.8.20-1.0.11 by @slack-oss-bot in #104
- Only run the M2ApiDetector on Kotlin files by @ZacSweers in #107
Full Changelog: 1.1.1...1.2.0
1.1.1
- Fix: Use
setEnabledByDefault(false)
instead ofIGNORE
inComposeM2Api
. This is what we intended before, too, but didn't realize there was a dedicated API for it. Note that this changes configuration slightly as you must now explicitly enable the rule too and not just the severity. See the docs: https://slackhq.github.io/compose-lints/rules/#use-material-3.
What's Changed
- Small rule tweaks to m3 by @ZacSweers in #79
- Use setEnableByDefault instead for M2ApiDetector by @ZacSweers in #81
Full Changelog: 1.1.0...1.1.1
1.1.0
- New: Add
ComposeM2Api
rule. This rule can be used to lint against using "Material 2" (androidx.compose.material
) APIs in codebases that have migrated to Material 3 (M3). This rule is disabled by default, see the docs for more information: https://slackhq.github.io/compose-lints/rules/#use-material-3. - Enhancement: Add
viewmodel-factories
lint option toComposeViewModelInjection
. This allows you to define your own known ViewModel factories. Thanks to @WhosNickDoglio for contributing this! - Build against lint-api to
30.4.2
. - Test against lint
31.1.0-alpha08
.
What's Changed
- v1.0.1 by @chrisbanes in #59
- Update ViewModelInjectionDetector to support a lint option by @WhosNickDoglio in #53
- Update lint-latest to v31.1.0-alpha05 by @slack-oss-bot in #61
- Update dependency gradle to v8.0.1 by @slack-oss-bot in #63
- Update lint-latest to v31.1.0-alpha06 by @slack-oss-bot in #65
- Fix CompositionLocals docs Markdown link by @vitusortner in #62
- Update dependency mkdocs-material to v9.0.14 by @slack-oss-bot in #64
- Update plugin lint to v7.4.2 by @slack-oss-bot in #69
- Update dependency mkdocs-material to v9.0.15 by @slack-oss-bot in #66
- Update dependency com.android.tools.lint:lint-api to v30.4.2 by @slack-oss-bot in #67
- Update plugin spotless to v6.16.0 by @slack-oss-bot in #70
- Update lint-latest to v31.1.0-alpha07 by @slack-oss-bot in #68
- Update dependency gradle to v8.0.2 by @slack-oss-bot in #73
- Update dependency mkdocs-material to v9.1.0 by @slack-oss-bot in #72
- Update plugin dokka to v1.8.10 by @slack-oss-bot in #74
- Update lint-latest to v31.1.0-alpha08 by @slack-oss-bot in #78
- Update dependency pymdown-extensions to v9.10 by @slack-oss-bot in #77
- Update dependency mkdocs-material to v9.1.1 by @slack-oss-bot in #76
- Implement M2ApiDetector by @ZacSweers in #75
New Contributors
- @vitusortner made their first contribution in #62
Full Changelog: 1.0.1...1.1.0
1.0.1
Changes
- Add installation instructions to index.md by @ZacSweers in #44
- Fix possible typo in README by @WhosNickDoglio in #45
- Hopefully fix publish-docs actions by @chrisbanes in #47
- Update lint-latest to v31.1.0-alpha04 by @slack-oss-bot in #51
- Update dependency mkdocs-material to v9.0.12 by @slack-oss-bot in #50
- Downgrade ComposeCompositionLocalUsage to warning by @chrisbanes in #52
- Misc mutable parameter fixes by @ZacSweers in #49
- Update plugin spotless to v6.15.0 by @slack-oss-bot in #54
- Update dependency gradle to v8 by @slack-oss-bot in #55
- Update Lint baseline by @chrisbanes in #58
New Contributors
- @WhosNickDoglio made their first contribution in #45
Full Changelog: 1.0.0...1.0.1
1.0.0
Initial release!
This is a near-full port of the original rule set to lint. It should be mostly at parity with the original rules as well.
The lints target lint-api 30.4.0
/lint API 13
and target Java 11.
See the docs for full usage and information: https://slackhq.github.io/compose-lints.
Notes
ComposeViewModelInjection
does not offer a quickfix yet. PRs welcome!ComposeUnstableCollections
is a warning by default rather than an error.CompositionLocalNaming
is not ported because this is offered in compose's bundled lint rules now.