Showing 1,727 of 1,727 total issues
Properties should be ordered font-size, margin, padding Open
margin: 0;
- Exclude checks
Properties should be ordered background-color, color, padding-bottom, padding-top Open
padding-top: 1rem;
- Exclude checks
Shorthand form for property padding
should be written more concisely as 1rem .33rem .9rem
instead of 1rem .33rem .9rem .33rem
Open
padding: 1rem .33rem .9rem .33rem;
- Exclude checks
Avoid using id selectors Open
#map {
- Exclude checks
Selector roles-user__info
should be written in lowercase with hyphens Open
.roles-user__info {
- Exclude checks
Color literals like #fff
should only be used in variable declarations; they should be referred to via variable everywhere else. Open
color: #fff;
- Exclude checks
Selector sign-up-box__title
should be written in lowercase with hyphens Open
.sign-up-box__title {
- Exclude checks
Properties should be ordered color, font-size Open
font-size: 1.05rem;
- Exclude checks
Extra empty line detected at class body beginning. Open
include CarrierWave::SampleImage::DefaultFolder
- Read upRead up
- Exclude checks
This cops checks if empty lines around the bodies of classes match the configuration.
Example: EnforcedStyle: empty_lines
# good
class Foo
def bar
# ...
end
end
Example: EnforcedStyle: emptylinesexcept_namespace
# good
class Foo
class Bar
# ...
end
end
Example: EnforcedStyle: emptylinesspecial
# good
class Foo
def bar; end
end
Example: EnforcedStyle: noemptylines (default)
# good
class Foo
def bar
# ...
end
end
Inconsistent indentation detected. Open
def original_file_name
Cloudinary::PreloadedFile.split_format(original_filename).first
end
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Freeze mutable objects assigned to constants. Open
MEDIUM_SIZE = [510, 287]
- 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
Missing magic comment # frozen_string_literal: true
. Open
#!/usr/bin/env ruby
- Read upRead up
- Exclude checks
This cop is designed to help upgrade to Ruby 3.0. It will add the
comment # frozen_string_literal: true
to the top of files to
enable frozen string literals. Frozen string literals may be default
in Ruby 3.0. The comment will be added below a shebang and encoding
comment. The frozen string literal comment is only valid in Ruby 2.3+.
Example: EnforcedStyle: when_needed (default)
# The `when_needed` style will add the frozen string literal comment
# to files only when the `TargetRubyVersion` is set to 2.3+.
# bad
module Foo
# ...
end
# good
# frozen_string_literal: true
module Foo
# ...
end
Example: EnforcedStyle: always
# The `always` style will always add the frozen string literal comment
# to a file, regardless of the Ruby version or if `freeze` or `<<` are
# called on a string literal.
# bad
module Bar
# ...
end
# good
# frozen_string_literal: true
module Bar
# ...
end
Example: EnforcedStyle: never
# The `never` will enforce that the frozen string literal comment does
# not exist in a file.
# bad
# frozen_string_literal: true
module Baz
# ...
end
# good
module Baz
# ...
end
Missing magic comment # frozen_string_literal: true
. Open
#!/usr/bin/env ruby
- Read upRead up
- Exclude checks
This cop is designed to help upgrade to Ruby 3.0. It will add the
comment # frozen_string_literal: true
to the top of files to
enable frozen string literals. Frozen string literals may be default
in Ruby 3.0. The comment will be added below a shebang and encoding
comment. The frozen string literal comment is only valid in Ruby 2.3+.
Example: EnforcedStyle: when_needed (default)
# The `when_needed` style will add the frozen string literal comment
# to files only when the `TargetRubyVersion` is set to 2.3+.
# bad
module Foo
# ...
end
# good
# frozen_string_literal: true
module Foo
# ...
end
Example: EnforcedStyle: always
# The `always` style will always add the frozen string literal comment
# to a file, regardless of the Ruby version or if `freeze` or `<<` are
# called on a string literal.
# bad
module Bar
# ...
end
# good
# frozen_string_literal: true
module Bar
# ...
end
Example: EnforcedStyle: never
# The `never` will enforce that the frozen string literal comment does
# not exist in a file.
# bad
# frozen_string_literal: true
module Baz
# ...
end
# good
module Baz
# ...
end
!important should not be used Open
margin-left: .10rem !important;
- Exclude checks
Prefer single quoted strings Open
@import "components/buttons";
- Exclude checks
Prefer single quoted strings Open
@import "components/user-points";
- Exclude checks
Prefer single quoted strings Open
@import "sections/home";
- Exclude checks
Prefer single quoted strings Open
@import "sections/my-groups";
- Exclude checks
Prefer single quoted strings Open
@import "sections/membership-requests";
- Exclude checks
Properties should be ordered background, border-radius, border-top, box-shadow Open
box-shadow: 0 1px .36px 0 $shadow;
- Exclude checks