lazd / gulp-csslint

CSSLint plugin for gulp
MIT License
74 stars 12 forks source link

Unable to ignore multiple rules in same file #48

Open ayjee opened 8 years ago

ayjee commented 8 years ago

Hello, I am attempting to ignore two separate csslint rules in a single file and I am unable to do so. If I move one rule out into another file, the linter does not complain. However, if I leave them in the same file, the linter does not seem to process the second ignore.

Please see below:

  .btn-default {
    border-color: @gray-4;
    background-color: @gray-6;
    color: @white;

    &:hover,
    &:active,
    &.active,
    &:focus,
    &.focus {
      border-color: @gray-6;
      background-color: @white;
      color: @gray-6;
    }

    /*csslint unqualified-attributes: false*/
    &:disabled,
    &.disabled,
    &[disabled] {
      border-color: @gray-b;
      background-color: @gray-b;
      color: @white;
    }
    /*csslint unqualified-attributes: true*/
  }

/*csslint qualified-headings:false*/
  .card__body {
    h1 {
      .source-sans();
      .title();
    }

    h2 {
      .source-sans();
      .subtitle();
    }
  }
  /*csslint qualified-headings:true*/

If I remove the unqualified attributes ignore, the qualified headings ignore will work just fine. It seems that the linter is just ignoring the second ignore altogether. I am using v0.3.0 of the plugin, and all linting is done after the files are converted to css.

Any help is appreciated. I did my fair share of research and could not find the culprit. Thanks! Here is the cl output from the linter:

csslint: There are 2 problems in /Users/ayjee/src/less/main.css.

main.css
1: warning at line 200, col 27
Heading (h1) should not be qualified.
.card__body h1 {

main.css
2: warning at line 206, col 27
Heading (h2) should not be qualified.
.card__body h2 {