You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,24 @@ gulp.task('lint', function() {
89
89
});
90
90
```
91
91
92
+
## Custom Rules
93
+
94
+
The plugin exposes the csslint `addRule` method which allows you to define custom rules that are run in addition to the included rules. [Creating your own rules](https://github.com/CSSLint/csslint/wiki/Working-with-Rules) works exactly like when using csslint directly.
95
+
96
+
```javascript
97
+
var csslint =require(‘gulp-csslint’);
98
+
99
+
csslint.addRule({
100
+
// rule object
101
+
});
102
+
103
+
gulp.task(‘lint’, function() {
104
+
gulp.files('lib/*.css')
105
+
.pipe(csslint())
106
+
.pipe(csslint.reporter())
107
+
});
108
+
```
109
+
92
110
## Fail on errors
93
111
94
112
Pipe the file stream to `csslint.failReporter()` to fail on errors.
0 commit comments