Skip to content

Commit b0c2816

Browse files
committed
ensure sharable config works
close #152
1 parent 08b9212 commit b0c2816

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"gulp-util": "^3.0.6"
4646
},
4747
"devDependencies": {
48+
"@shinnn/eslint-config-node": "^2.0.0",
4849
"babel-eslint": "^6.1.0",
4950
"from2-string": "^1.1.0",
5051
"gulp": "^3.9.0",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: '@shinnn/node'
3+
};

test/linting.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,30 @@ describe('gulp-eslint plugin', () => {
4141
}));
4242
});
4343

44+
it('should support sharable config', done => {
45+
eslint(path.resolve(__dirname, 'fixtures/eslintrc-sharable-config.js'))
46+
.on('error', done)
47+
.on('data', file => {
48+
should.exist(file);
49+
should.exist(file.contents);
50+
should.exist(file.eslint);
51+
52+
file.eslint.messages
53+
.should.be.instanceof(Array)
54+
.and.have.lengthOf(1);
55+
56+
file.eslint.messages[0]
57+
.should.have.properties('message', 'line', 'column')
58+
.and.have.property('ruleId', 'eol-last');
59+
60+
done();
61+
})
62+
.end(new File({
63+
path: 'test/fixtures/no-newline.js',
64+
contents: new Buffer('console.log(\'Hi\');')
65+
}));
66+
});
67+
4468
it('should produce expected message via buffer', done => {
4569
eslint({useEslintrc: false, rules: {strict: [2, 'global']}})
4670
.on('error', done)

0 commit comments

Comments
 (0)