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
@@ -34,7 +34,7 @@ You can pass rule configuration as an object. See the [list of rules by ID on th
34
34
35
35
Any properties passed wil be in _addition_ to (or overwriting) the ones in .csslintrc (unless `lookup: false` is passed).
36
36
37
-
```javascript
37
+
```js
38
38
gulp.src('client/css/*.css')
39
39
.pipe(csslint({
40
40
'shorthand':false
@@ -49,7 +49,7 @@ Type: `String`
49
49
50
50
You can also pass the path to your csslintrc file instead of a rule configuration object.
51
51
52
-
```javascript
52
+
```js
53
53
gulp.src('client/css/*.css')
54
54
.pipe(csslint('csslintrc.json'))
55
55
.pipe(csslint.reporter());
@@ -59,7 +59,7 @@ gulp.src('client/css/*.css')
59
59
60
60
Adds the following properties to the file object:
61
61
62
-
```javascript
62
+
```js
63
63
file.csslint.success=true; // or false
64
64
file.csslint.errorCount=0; // number of errors returned by CSSLint
65
65
file.csslint.results= []; // CSSLint errors
@@ -70,7 +70,7 @@ file.csslint.opt = {}; // The options you passed to CSSLint
70
70
71
71
Custom reporter functions can be passed as `csslint.reporter(reporterFunc)`. The reporter function will be called for each linted file and passed the file object as described above.
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.
94
+
Use the `csslint.addRule(rule)` method to define custom rules that run in addition to the rules defined in the csslintrc file. See [Working with Rules](https://github.com/CSSLint/csslint/wiki/Working-with-Rules)for details.
0 commit comments