Kercode/tutti_gruppi

View on GitHub

Showing 625 of 625 total issues

Properties should be ordered display, float, margin, margin-top
Open

  margin: 0 auto;

Avoid using id selectors
Open

#message {

Properties should be ordered color, font-size, font-weight, text-decoration
Open

  font-size: 16px;

border: 0 is preferred over border: none
Open

  border: none;

Properties should be ordered color, font-size, line-height
Open

    font-size: 2em;

Avoid using id selectors
Open

div#flash_notice.flash_message{

Properties should be ordered background-image, box-shadow, transform
Open

        box-shadow: 0 4px 12px rgba($color-black, 0.5);

Unnecessary parent selector (&)
Open

  & span.current {

Line should be indented 2 spaces, but was indented 4 spaces
Open

    transform: translate(-50%, -50%);

Color gray should be written in hexadecimal form as #808080
Open

$color-dark-gray: gray;

Files should end with a trailing newline
Open

}

Files should end with a trailing newline
Open

}

Prefer single quoted strings
Open

    content: "\f077";

Avoid qualifying class selectors with an element.
Open

section.gpmt {

Selector should have depth of applicability no greater than 3, but was 5
Open

        p {

Class '.manage_products' should be written in lowercase with hyphens
Open

.manage_products {

Class Name Format

Rule class-name-format will enforce a convention for class names.

Options

  • allow-leading-underscore: true/false (defaults to true)
  • convention: 'hyphenatedlowercase' (default), camelcase, snakecase, strictbem, hyphenatedbem, or a Regular Expression that the class name must match (e.g. ^[_A-Z]+$)
  • convention-explanation: Custom explanation to display to the user if a class doesn't adhere to the convention
  • ignore: Array of names to ignore

Example 1

Settings: - allow-leading-underscore: true - convention: hyphenatedlowercase

When enabled, the following are allowed:

.hyphenated-lowercase {
  content: '';

  &._with-leading-underscore {
    content: '';
  }
}

.foo {
  @extend .hyphenated-lowercase;
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.camelCase {
  content: '';

  @extend .snake_case;
}

Example 2

Settings: - allow-leading-underscore: false - convention: hyphenatedlowercase

When enabled, the following are allowed:

.hyphenated-lowercase {
  content: '';

  &.another-hyphenated-lowercase {
    content: '';
  }
}

.foo {
  @extend .hyphenated-lowercase;
}

When enabled, the following are disallowed:

._with-leading-underscore {
  content: '';
}

.HYPHENATED-UPPERCASE {
  content: '';
}

.camelCase {
  content: '';

  @extend .snake_case;
}

Example 3

Settings: - convention: camelcase

When enabled, the following are allowed:

.camelCase {
  content: '';
}

.foo {
  @extend .anotherCamelCase;
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.foo {
  @extend .snake_case;
}

Example 4

Settings: - convention: pascalcase

When enabled, the following are allowed:

.PascalCase {
  content: '';
}

.Foo {
  @extend .AnotherPascalCase;
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.foo {
  @extend .snake_case;
}

Example 5

Settings: - convention: snakecase

When enabled, the following are allowed:

.snake_case {
  content: '';
}

.foo {
  @extend .another_snake_case;
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.foo {
  @extend .camelCase;
}

Example 6

Settings: - convention: strictbem

When enabled, the following are allowed:

.block-name__elem-name {
  content: '';
}

.owner-name_mod-name_mod-val {
  content: '';
}

.block-name__elem-name_mod-bool {
  content: '';
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.foo {
  @extend .camelCase;
}

Example 7

Settings: - convention: hyphenatedbem

When enabled, the following are allowed:

.site-search {
  color: blue;
  width: 50px;
  height: 100%;
}

.site-search__field {
  text-decoration: underline;
}

.site-search--full {
  color: green;
}

When enabled, the following are disallowed:

.HYPHENATED-UPPERCASE {
  content: '';
}

.foo {
  @extend .camelCase;
}

Example 8

Settings: - convention: ^[_A-Z]+$ - convention-explanation: 'Class must contain only uppercase letters and underscores'

When enabled, the following are allowed:

.SCREAMING_SNAKE_CASE {
  content: '';
}

.foo {
  @extend .SCREAMING_SNAKE_CASE;
}

When enabled, the following are disallowed:

(Each line with a class will report Class must contain only uppercase letters and underscores when linted.)

.HYPHENATED-UPPERCASE {
  content: '';
}

.snake_case {
  content: '';
}

.foo {
  @extend .camelCase;
}

Files must end with a new line
Open

}

Final Newline

Rule final-newline will enforce whether or not files should end with a newline.

Options

  • include: true/false (defaults to true)

Examples

When include: true, the following are allowed. When include: false, the following are disallowed:

.foo {
  content: 'bar';
}
// Newline under this comment at end of file

When include: false, the following are allowed. When include: true, the following are disallowed:

.foo {
  content: 'bar';
}
// No newline under this comment at end of file

Properties should be ordered font-size, margin-bottom
Open

          margin-bottom: 0;

Color #DDD should be written as #ddd
Open

$color-light-gray: #DDD;

Use // comments everywhere
Open

/* PAGINATION */
Severity
Category
Status
Source
Language