Skip to content

Commit

Permalink
add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
刘祺 committed Apr 21, 2017
1 parent dd03625 commit 4201543
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 20 deletions.
49 changes: 49 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"env": {
"node": true
},
"extends": [
"eslint:recommended"
],
"globals": {
"Promise": true
},
"rules": {
"semi": [
2,
"never"
],
"no-cond-assign": [
2,
"except-parens"
],
"no-unused-expressions": 2,
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"comma-style": [
2,
"first"
],
"max-len": [
2,
{
"code": 100,
"ignoreComments": true
}
],
"new-cap": 2,
"strict": 0,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-unused-vars": 2,
"quotes": [
2,
"single"
]
}
}
16 changes: 0 additions & 16 deletions .jshintrc

This file was deleted.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "PostCSS gulp plugin",
"main": "index.js",
"scripts": {
"pretest": "eslint index.js",
"test": "mocha test.js"
},
"repository": {
Expand All @@ -29,10 +30,11 @@
"vinyl-sourcemaps-apply": "^0.2.1"
},
"devDependencies": {
"gulp-sourcemaps": "^1.11.0",
"eslint": "^3.19.0",
"gulp-sourcemaps": "^2.6.0",
"mocha": "^3.2.0",
"proxyquire": "^1.7.4",
"sinon": "^1.17.3"
"proxyquire": "^1.7.11",
"sinon": "^2.1.0"
},
"files": []
}
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ describe('PostCSS Guidelines', function () {
}
}))
stream.on('data', function () {
assert.deepEqual(postcssLoadConfigStub.getCall(0).args[1], __dirname + '/relative/path')
assert.deepEqual(postcssLoadConfigStub.getCall(0).args[1], path.join(__dirname, 'relative/path'))
cb()
})
stream.end(new gutil.File({
Expand Down

0 comments on commit 4201543

Please sign in to comment.