lib/supabase/client.rb
Freeze mutable objects assigned to constants. Open
Open
DEFAULT_SCHEMA = 'public'
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze
# good
CONST = <<~TESTING.freeze
This is a heredoc
TESTING
Avoid comma after the last item of a hash. Open
Open
"X-Client-Info": "supabase-rb/#{Supabase::VERSION}",
- Read upRead up
- Exclude checks
This cop checks for trailing comma in hash literals.
Example: EnforcedStyleForMultiline: consistent_comma
# bad
a = { foo: 1, bar: 2, }
# good
a = {
foo: 1, bar: 2,
qux: 3,
}
# good
a = {
foo: 1,
bar: 2,
}
Example: EnforcedStyleForMultiline: comma
# bad
a = { foo: 1, bar: 2, }
# good
a = {
foo: 1,
bar: 2,
}
Example: EnforcedStyleForMultiline: no_comma (default)
# bad
a = { foo: 1, bar: 2, }
# good
a = {
foo: 1,
bar: 2
}