SU-SWS/stanford_profile

View on GitHub

Showing 200 of 288 total issues

Pseudo-elements must start with double colons
Open

        &:before {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

      &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Type-selector should be nested within its parent Class
Open

.stanford-people-grid .views-row .views-field-title a {

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

Nesting depth 5 greater than max of 4
Open

          &:hover,

Nesting Depth

Rule nesting-depth will enforce how deeply a selector can be nested.

Options

  • max-depth: number (defaults to 2)

Examples

When enabled (assuming max-depth: 2) the deepest element (&:hover and &--modifier) are at at depth 2. Any nested selector deeper is disallowed:

.foo {
  .baz {
    &:hover {
      // Deepest Nest Allowed
    }
  }
}

.block {
  &__element {
    &--modifier {
      // Deepest Nest Allowed
    }
  }
}

Space expected between blocks
Open

          &:after {

Empty Line Between Blocks

Rule empty-line-between-blocks will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.

Options

  • include: true/false (defaults to true)
  • allow-single-line-rulesets: true/false (defaults to true)

Examples

include

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

.foo {
  content: 'foo';

  .bar {
    content: 'bar';

    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

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

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

allow-single-line-rulesets

When allow-single-line-rulesets: true, the following are allowed. When allow-single-line-rulesets: false, the following are disallowed:

.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }

Pseudo-elements must start with double colons
Open

        &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

File extensions are not allowed
Open

@import 'lockup/index.scss';

Clean Import Paths

Rule clean-import-paths will enforce whether or not @import paths should have leading underscores and/or filename extensions.

Options

  • leading-underscore: true/false (defaults to false)
  • filename-extension: true/false (defaults to false)

Examples

leading-underscore

When leading-underscore: false, the following are allowed. When leading-underscore: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When leading-underscore: true, the following are allowed. When leading-underscore: false, the following are disallowed:

@import '_foo';
@import '_bar/foo';

filename-extension

When filename-extension: false, the following are allowed. When filename-extension: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When filename-extension: true, the following are allowed. When filename-extension: false, the following are disallowed:

@import 'foo.scss';
@import 'bar/foo.scss';

Pseudo-elements must start with double colons
Open

    &:before {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

        &:before {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

No trailing whitespace allowed
Open

} 

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

Expected indentation of 0 space but found 2.
Open

  //@include example--black-icons

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

No empty blocks allowed
Open

    &:before {

No Empty Rulesets

Rule no-empty-rulesets will enforce that rulesets are not empty.

Examples

When enabled, the following are disallowed:

.foo {

}

.bar {
  content: 'baz';

  .qux {}
}

.waldo {}

Class should be nested within its parent Class
Open

.su-button--big.su-link,

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

Pseudo-elements must start with double colons
Open

      &:before {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

No trailing whitespace allowed
Open

    }

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

Pseudo-elements must start with double colons
Open

      &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

No trailing whitespace allowed
Open

      }

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

No trailing whitespace allowed
Open

  &.su-link--external {

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

File extensions are not allowed
Open

@import 'brandbar/index.scss';

Clean Import Paths

Rule clean-import-paths will enforce whether or not @import paths should have leading underscores and/or filename extensions.

Options

  • leading-underscore: true/false (defaults to false)
  • filename-extension: true/false (defaults to false)

Examples

leading-underscore

When leading-underscore: false, the following are allowed. When leading-underscore: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When leading-underscore: true, the following are allowed. When leading-underscore: false, the following are disallowed:

@import '_foo';
@import '_bar/foo';

filename-extension

When filename-extension: false, the following are allowed. When filename-extension: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When filename-extension: true, the following are allowed. When filename-extension: false, the following are disallowed:

@import 'foo.scss';
@import 'bar/foo.scss';

File extensions are not allowed
Open

@import 'masthead/index.scss';

Clean Import Paths

Rule clean-import-paths will enforce whether or not @import paths should have leading underscores and/or filename extensions.

Options

  • leading-underscore: true/false (defaults to false)
  • filename-extension: true/false (defaults to false)

Examples

leading-underscore

When leading-underscore: false, the following are allowed. When leading-underscore: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When leading-underscore: true, the following are allowed. When leading-underscore: false, the following are disallowed:

@import '_foo';
@import '_bar/foo';

filename-extension

When filename-extension: false, the following are allowed. When filename-extension: true, the following are disallowed:

@import 'foo';
@import 'bar/foo';

When filename-extension: true, the following are allowed. When filename-extension: false, the following are disallowed:

@import 'foo.scss';
@import 'bar/foo.scss';
Severity
Category
Status
Source
Language