diff --git a/.travis.yml b/.travis.yml index ae2d113..4bcc5b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,6 @@ node_js: - "0.10" - "0.12" - "4.1" +branches: + only: + - master diff --git a/package.json b/package.json index 22bf0c2..bc7071e 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "gulp-util": "^3.0.0", "lodash": "^4.12.0", "minimatch": "^3.0.3", - "rcloader": "^0.2.1", + "rcloader": "^0.2.2", "through2": "^2.0.0" }, "peerDependencies": { diff --git a/test/fixtures/project/.jshintrc b/test/fixtures/project/.jshintrc new file mode 100644 index 0000000..04a835d --- /dev/null +++ b/test/fixtures/project/.jshintrc @@ -0,0 +1,6 @@ +{ + "undef": true, + "globals": { + "angular": false + } +} diff --git a/test/fixtures/project/src/index.js b/test/fixtures/project/src/index.js new file mode 100644 index 0000000..b9efc50 --- /dev/null +++ b/test/fixtures/project/src/index.js @@ -0,0 +1 @@ +angular(); diff --git a/test/specs/config.js b/test/specs/config.js new file mode 100644 index 0000000..b5f30dc --- /dev/null +++ b/test/specs/config.js @@ -0,0 +1,22 @@ +var Fixture = require('../util').Fixture; +var jshint = require('../../src'); +var resolve = require('path').resolve; +var should = require('should'); + +describe('Config', function () { + it('pointing to a specific config file works (issue #152)', function (done) { + var stream = jshint(resolve(__dirname, '../fixtures/project/.jshintrc')); + + stream.on('data', function (file) { + should(file.jshint.results).be.undefined(); + }); + + stream.once('end', function () { + done(); + }); + + stream.write(new Fixture('project/src/index.js')); + stream.write(new Fixture('project/src/index.js')); + stream.end(); + }); +}); diff --git a/test/specs/index.js b/test/specs/index.js index ac35d63..ae85368 100644 --- a/test/specs/index.js +++ b/test/specs/index.js @@ -26,4 +26,5 @@ describe('gulp-jshint', function () { require('./linting'); require('./reporters'); require('./integration'); + require('./config'); });