npm-package-json-lint
Advanced tools
Comparing version 2.11.1 to 2.11.2
@@ -14,2 +14,6 @@ # Change Log | ||
## [2.11.2] - 2018-02-18 | ||
### Fixed | ||
- Addressed issue, from @akihyro, [#71](https://github.com/tclindner/npm-package-json-lint/issues/71). Bundled dependencies should be arrays instead of objects. Impacts [bundledDependencies-type](https://github.com/tclindner/npm-package-json-lint/wiki/bundledDependencies-type) | ||
## [2.11.1] - 2017-12-27 | ||
@@ -16,0 +20,0 @@ ### Fixed |
{ | ||
"name": "npm-package-json-lint", | ||
"version": "2.11.1", | ||
"version": "2.11.2", | ||
"description": "CLI app for linting package.json files.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -127,2 +127,2 @@ # npm-package-json-lint | ||
Copyright (c) 2016-2017 Thomas Lindner. Licensed under the MIT license. | ||
Copyright (c) 2016-2018 Thomas Lindner. Licensed under the MIT license. |
'use strict'; | ||
const isObject = require('./../validators/type').isObject; | ||
const isArray = require('./../validators/type').isArray; | ||
const LintIssue = require('./../LintIssue'); | ||
const lintId = 'bundledDependencies-type'; | ||
const nodeName = 'bundledDependencies'; | ||
const message = 'Type should be an Object'; | ||
const message = 'Type should be an array'; | ||
const ruleType = 'standard'; | ||
const lint = function(packageJsonData, lintType) { | ||
if (!isObject(packageJsonData, nodeName)) { | ||
if (!isArray(packageJsonData, nodeName)) { | ||
return new LintIssue(lintId, lintType, nodeName, message); | ||
@@ -13,0 +13,0 @@ } |
Sorry, the diff of this file is not supported yet
96498