Skip to content

Conversation

@akrawitz
Copy link
Contributor

Adds the ability to allow specified rule violations on specific lines:

.foo.bar { /* csslint allow: adjoining-classes */
    margin: 0;
}
.baz.qux {
    fill: none !important; /* csslint allow: known-properties, important */
}

A rule violation is only allowed on the line with the csslint allow statement, and only for the rules listed on that line. This facilitates the use of CSSLint in cases where you generally agree with a rule, but recognize that there may be occasional exceptions. You can explicitly allow rule violations in your CSS file, without sacrificing the ability to detect other rule violations on the same line, or other instances of this particular rule violation on other lines. You can easily find these exceptions with a simple search for "csslint allow", and it is explicit what each exception is for.

Add ability to allow specific rule violations on specific lines of a CSS
file.
@frvge
Copy link
Contributor

frvge commented Jan 23, 2016

👍 looks good to me

@frvge
Copy link
Contributor

frvge commented Jan 26, 2016

@akrawitz can you please prepare some documentation about this? You can already put it on the wiki with a [to be merged] warning or something. I think https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting would be a good page to add it.

@frvge
Copy link
Contributor

frvge commented Feb 9, 2016

I will merge this and create some documentation.

@frvge frvge added this to the 1.0.0 milestone Feb 9, 2016
frvge added a commit that referenced this pull request Feb 9, 2016
@frvge frvge merged commit 77b08b1 into CSSLint:master Feb 9, 2016
@akrawitz
Copy link
Contributor Author

Thanks @frvge. Sorry I didn't get to the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants