-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into greenkeeper/remove-node-0.10
- Loading branch information
Showing
28 changed files
with
825 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Toggling Rules Inside Source Files | ||
|
||
For special cases where a particular lint doesn't make sense in a specific area of a file, special inline comments can be used to enable/disable linters. Some examples are provided below: | ||
|
||
## Disable a rule for the entire file | ||
|
||
```scss | ||
// sass-lint:disable border-zero | ||
p { | ||
border: none; // No lint reported | ||
} | ||
``` | ||
|
||
## Disable more than 1 rule | ||
|
||
```scss | ||
// sass-lint:disable border-zero, quotes | ||
p { | ||
border: none; // No lint reported | ||
content: "hello"; // No lint reported | ||
} | ||
``` | ||
|
||
## Disable a rule for a single line | ||
|
||
```scss | ||
p { | ||
border: none; // sass-lint:disable-line border-zero | ||
} | ||
``` | ||
|
||
## Disable all lints within a block (and all contained blocks) | ||
|
||
```scss | ||
p { | ||
// sass-lint:disable-block border-zero | ||
border: none; // No result reported | ||
} | ||
|
||
a { | ||
border: none; // Failing result reported | ||
} | ||
``` | ||
|
||
## Disable and enable again | ||
|
||
```scss | ||
// sass-lint:disable border-zero | ||
p { | ||
border: none; // No result reported | ||
} | ||
// sass-lint:enable border-zero | ||
|
||
a { | ||
border: none; // Failing result reported | ||
} | ||
``` | ||
|
||
## Disable/enable all linters | ||
|
||
```scss | ||
// sass-lint:disable-all | ||
p { | ||
border: none; // No result reported | ||
} | ||
// sass-lint:enable-all | ||
|
||
a { | ||
border: none; // Failing result reported | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.