SU-SWS/stanford_profile_helper

View on GitHub

Showing 392 of 585 total issues

Class '.mc_signup_submission_wrapper' should be written in hyphenated BEM (Block Element Modifier) format
Open

    .mc_signup_submission_wrapper {

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;
}

Class should be nested within its parent Type-selector
Open

    div.su-card__superhead {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

Expected indentation of 8 spaces but found 6.
Open

      .views-row:last-of-type {

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 4 spaces but found 2.
Open

  .su-basic-page-types-list {

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 6 spaces but found 4.
Open

    img,

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Qualifying elements are not allowed for class selectors
Open

    div.su-card__superhead {

No Qualifying Elements

Rule no-qualifying-elements will enforce that selectors are not allowed to have qualifying elements.

Options

  • allow-element-with-attribute: true/false (defaults to false)
  • allow-element-with-class: true/false (defaults to false)
  • allow-element-with-id: true/false (defaults to false)

Examples

By default, the following are disallowed:

div.foo {
  content: 'foo';
}

ul#foo {
  content: 'foo';
}

input[type='email'] {
  content: 'foo';
}

allow-element-with-attribute

When allow-element-with-attribute: true, the following are allowed. When allow-element-with-attribute: false, the following are disallowed.

input[type='email'] {
  content: 'foo';
}

a[href] {
  content: 'foo';
}

allow-element-with-class

When allow-element-with-class: true, the following are allowed. When allow-element-with-class: false, the following are disallowed.

div.foo {
  content: 'foo';
}

h1.bar {
  content: 'foo';
}

allow-element-with-id

When allow-element-with-id: true, the following are allowed. When allow-element-with-id: false, the following are disallowed.

ul#foo {
  content: 'foo';
}

p#bar {
  content: 'foo';
}

Property container appears to be spelled incorrectly
Open

  container: paragraph / inline-size;

No Misspelled Properties

Rule no-misspelled-properties will enforce the correct spelling of CSS properties and prevent the use of unknown CSS properties.

Options

  • extra-properties: [array of extra properties to check spelling against] (defaults to empty array []).

Examples

When enabled, the following are disallowed:

// incorrect spelling
.foo {
  borders: 0;
}

// unknown property
.bar {
  border-right-left: 0;
}

// incorrect spelling
.baz {
  -webkit-transit1on: width 2s;
}

When extra-properties contains a property value of transit1on as show below:

no-misspelled-properties:
  - 1
  -
    'extra-properties':
      - 'transit1on'

The following would now be allowed:

// incorrect spelling now whitelisted
.baz {
  -webkit-transit1on: width 2s;
}

// incorrect spelling now whitelisted
.quz {
  transit1on: width 2s;
}

While the following would remain disallowed:

// incorrect spelling
.foo {
  borders: 0;
}

// unknown property
.bar {
  border-right-left: 0;
}

Expected indentation of 8 spaces but found 6.
Open

      .views-col,

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 6 spaces but found 4.
Open

    &:last-of-type {

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 4 spaces but found 2.
Open

  .su-news-vertical-teaser {

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Include leading zeros on numbers
Open

      font-size: .9em;

Leading Zero

Rule leading-zero will enforce whether or not decimal numbers should include a leading zero.

Options

  • include: true/false (defaults to false)

Examples

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

.foo {
  font-size: .5em;
}

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

.foo {
  font-size: 0.5em;
}

Expected indentation of 8 spaces but found 6.
Open

      .views-col,

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 6 spaces but found 4.
Open

    flex: none;

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

!important not allowed
Open

    font-size: 18px !important;

No Important

Rule no-important will enforce that important declarations are not allowed to be used.

Examples

When enabled, the following are disallowed:

.foo {
  content: 'bar' !important;
}

Space expected after :
Open

        margin-bottom:0;

Space After Colon

Rule space-after-colon will enforce whether or not a space should be included after a colon (:).

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';
}

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

.foo {
  content:'bar';
}

!important not allowed
Open

  z-index: 1300 !important;

No Important

Rule no-important will enforce that important declarations are not allowed to be used.

Examples

When enabled, the following are disallowed:

.foo {
  content: 'bar' !important;
}

Don't include trailing zeros on numbers
Open

    margin-bottom: 1.0rem;

No Trailing Zero

Rule no-trailing-zero will enforce that trailing zeros are not allowed.

Examples

When enabled, the following are disallowed:

.foo {
  margin: 1.500rem;
}

.foo {
  margin: .500rem;
}

.foo {
  margin: 0.2500rem;
}

.foo {
  margin: 4.0rem;
}

Property gap appears to be spelled incorrectly
Open

    gap: 10px;

No Misspelled Properties

Rule no-misspelled-properties will enforce the correct spelling of CSS properties and prevent the use of unknown CSS properties.

Options

  • extra-properties: [array of extra properties to check spelling against] (defaults to empty array []).

Examples

When enabled, the following are disallowed:

// incorrect spelling
.foo {
  borders: 0;
}

// unknown property
.bar {
  border-right-left: 0;
}

// incorrect spelling
.baz {
  -webkit-transit1on: width 2s;
}

When extra-properties contains a property value of transit1on as show below:

no-misspelled-properties:
  - 1
  -
    'extra-properties':
      - 'transit1on'

The following would now be allowed:

// incorrect spelling now whitelisted
.baz {
  -webkit-transit1on: width 2s;
}

// incorrect spelling now whitelisted
.quz {
  transit1on: width 2s;
}

While the following would remain disallowed:

// incorrect spelling
.foo {
  borders: 0;
}

// unknown property
.bar {
  border-right-left: 0;
}

Expected indentation of 4 spaces but found 2.
Open

  .stanford-people-grid {

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}

Expected indentation of 10 spaces but found 8.
Open

        margin-bottom: 0;

Indentation

Rule indentation will enforce an indentation size (tabs and spaces) and it will also ensure that tabs and spaces are not mixed.

The mixed spaces and tabs warnings check will take into account what you have set in your config file whether it should expect to see spaces or tabs. If it encounters a tab anywhere in a file when your rule config doesn't specify tabs it will flag a lint warning, Similarly for any whitespace using spaces when tabs are specified. Obviously spaces between properties and values etc are ignored.

Options

  • size: number or 'tab' (defaults to 2 spaces)

Examples

When enabled (assuming size: 2) the following are allowed:

.foo {
  content: 'bar';

  .baz {
    content: 'qux';

    // Waldo
    &--waldo {
      content: 'alpha';
    }
  }
}

When enabled (assuming size: 2) the following are disallowed:

.foo {
content: 'bar';
   .baz {
  content: 'qux';
  // Waldo
      &--waldo {
        content: 'alpha';
      }
    }
}
Severity
Category
Status
Source
Language