Skip to content

Commit f441a89

Browse files
authored
Fixed expected type for bundled dependencies (#72)
Fixes #71
1 parent 694d766 commit f441a89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rules/bundledDependencies-type.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
const isObject = require('./../validators/type').isObject;
3+
const isArray = require('./../validators/type').isArray;
44
const LintIssue = require('./../LintIssue');
55
const lintId = 'bundledDependencies-type';
66
const nodeName = 'bundledDependencies';
7-
const message = 'Type should be an Object';
7+
const message = 'Type should be an array';
88
const ruleType = 'standard';
99

1010
const lint = function(packageJsonData, lintType) {
11-
if (!isObject(packageJsonData, nodeName)) {
11+
if (!isArray(packageJsonData, nodeName)) {
1212
return new LintIssue(lintId, lintType, nodeName, message);
1313
}
1414

tests/unit/rules/bundledDependencies-type.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('bundledDependencies-type Unit Tests', function() {
2424
response.lintId.should.equal('bundledDependencies-type');
2525
response.lintType.should.equal('error');
2626
response.node.should.equal('bundledDependencies');
27-
response.lintMessage.should.equal('Type should be an Object');
27+
response.lintMessage.should.equal('Type should be an array');
2828
});
2929
});
3030

0 commit comments

Comments
 (0)