Skip to content

Commit 87bc23b

Browse files
committed
Minor formatting and wording fixes
1 parent b365adf commit 87bc23b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ npm install --save-dev gulp-csslint
1111

1212
Then, add it to your `gulpfile.js`:
1313

14-
```javascript
14+
```js
1515
var csslint = require('gulp-csslint');
1616

1717
gulp.task('css', function() {
@@ -34,7 +34,7 @@ You can pass rule configuration as an object. See the [list of rules by ID on th
3434

3535
Any properties passed wil be in _addition_ to (or overwriting) the ones in .csslintrc (unless `lookup: false` is passed).
3636

37-
```javascript
37+
```js
3838
gulp.src('client/css/*.css')
3939
.pipe(csslint({
4040
'shorthand': false
@@ -49,7 +49,7 @@ Type: `String`
4949

5050
You can also pass the path to your csslintrc file instead of a rule configuration object.
5151

52-
```javascript
52+
```js
5353
gulp.src('client/css/*.css')
5454
.pipe(csslint('csslintrc.json'))
5555
.pipe(csslint.reporter());
@@ -59,7 +59,7 @@ gulp.src('client/css/*.css')
5959

6060
Adds the following properties to the file object:
6161

62-
```javascript
62+
```js
6363
file.csslint.success = true; // or false
6464
file.csslint.errorCount = 0; // number of errors returned by CSSLint
6565
file.csslint.results = []; // CSSLint errors
@@ -70,7 +70,7 @@ file.csslint.opt = {}; // The options you passed to CSSLint
7070

7171
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.
7272

73-
```javascript
73+
```js
7474
var csslint = require('gulp-csslint');
7575
var gutil = require('gulp-util');
7676

@@ -91,13 +91,13 @@ gulp.task('lint', function() {
9191

9292
## Custom Rules
9393

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.
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.
9595

96-
```javascript
97-
var csslint = require(gulp-csslint);
96+
```js
97+
var csslint = require('gulp-csslint');
9898

9999
csslint.addRule({
100-
// rule object
100+
// rule information
101101
});
102102

103103
gulp.task(‘lint’, function() {
@@ -111,7 +111,7 @@ gulp.task(‘lint’, function() {
111111

112112
Pipe the file stream to `csslint.failReporter()` to fail on errors.
113113

114-
```javascript
114+
```js
115115
var csslint = require('gulp-csslint');
116116

117117
gulp.task('lint', function() {

0 commit comments

Comments
 (0)