chore: enable strict-raw-types in supabase_lints and fix all violations#1582
Merged
Merged
Conversation
Enables the strict-raw-types analyzer language mode in the shared supabase_lints config and fixes the 33 resulting violations. All changes are non-breaking: raw generic types are made explicit as <dynamic> (identical type), four PostgrestFilterBuilder return types are narrowed back to <T>, and a local variable is renamed from arr to array.
Vinzent03
approved these changes
Jul 10, 2026
grdsdev
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enables the
strict-raw-typesanalyzer language mode in the sharedsupabase_lintsconfig and fixes the 33 resulting violations across the monorepo.Why
Raw types (generics used without explicit type arguments) silently weaken type safety. Turning on
strict-raw-typescatches them and keeps new code from reintroducing them.Changes
packages/supabase_lints/lib/analysis_options.yaml: enableanalyzer: language: strict-raw-types: true.lib/, 11 in tests).All changes are non-breaking:
<dynamic>(identical type):Map→Map<dynamic, dynamic>,List→List<dynamic>,StreamSubscription/CancelableOperation→<dynamic>,PostgrestQueryBuilder→PostgrestQueryBuilder<dynamic>,RawPostgrestBuilder→RawPostgrestBuilder<dynamic, dynamic, dynamic>.PostgrestFilterBuilderreturn types restored to<T>(likeAllOf,likeAnyOf,ilikeAllOf,ilikeAnyOf) — return-type narrowing, which is safe.arr→arrayintransformers.dart.Out of scope
Actually threading real type parameters through the postgrest/supabase builders (instead of
<dynamic>) is a breaking API change, tracked for v3 in #1581.Verification
dart analyze packages→ No issues found!dart format.