Skip to content

Commit

Permalink
chore(deps): update eslint-config-dustinspecker
Browse files Browse the repository at this point in the history
Closes #34
  • Loading branch information
dustinspecker committed Apr 16, 2016
1 parent e344a3c commit 32670b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"chai": "^3.0.0",
"coveralls": "^2.11.2",
"del": "^2.0.0",
"eslint-config-dustinspecker": "^0.4.0",
"eslint-config-dustinspecker": "^0.5.0",
"eslint-plugin-new-with-error": "^1.1.0",
"eslint-plugin-no-use-extend-native": "^0.3.1",
"gulp": "^3.9.0",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import through from 'through2'

const runAlex = (callback, file, allow = []) => {
file.alex = alex(file.contents.toString(), allow)

return callback(null, file)
}

Expand All @@ -19,6 +20,7 @@ module.exports = () =>
/* eslint consistent-return: 0 */
if (!file || file.isNull()) {
this.push()

return callback()
}

Expand All @@ -36,6 +38,7 @@ module.exports = () =>
}

const {allow} = JSON.parse(fileContents)

return runAlex(callback, file, allow)
})
})
Expand All @@ -53,6 +56,7 @@ module.exports.reporter = (reporterType = 'default') => {

if (!file || file.isNull()) {
this.push()

return callback()
}

Expand Down
8 changes: 6 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe('gulp-alex', () => {
let alexProxy, fileWithOneError, findUpStub, readPkgUpStub, reporter, stream, validFile

beforeEach(() => {
findUpStub = austin.spy().withArgs('.alexrc').returns(Promise.resolve(null))
findUpStub = austin.spy()
.withArgs('.alexrc')
.returns(Promise.resolve(null))
readPkgUpStub = austin.spy().returns(Promise.resolve({}))
reporter = austin.spy()
alexProxy = proxyquire('../lib', {
Expand Down Expand Up @@ -182,7 +184,9 @@ describe('gulp-alex', () => {

describe('allowables', () => {
it('should use .alexrc', done => {
findUpStub = austin.spy().withArgs('.alexrc').returns(Promise.resolve('.alexrc'))
findUpStub = austin.spy()
.withArgs('.alexrc')
.returns(Promise.resolve('.alexrc'))
const fsStub = {
readFile(file, encoding, cb) {
cb(null, '{"allow": ["garbagemen-garbagewomen"]}')
Expand Down

0 comments on commit 32670b2

Please sign in to comment.