npm-package-json-lint
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -7,2 +7,6 @@ # Change Log | ||
## [4.0.3] - 2019-10-26 | ||
### Fixed | ||
- Resolved an issue where package.json files were not recursively scanned for when the CLI/API pattern was a directory. Ex: `/packages` would only detect the package.json file in `/packages`. | ||
## [4.0.2] - 2019-10-19 | ||
@@ -57,3 +61,3 @@ ### Fixed | ||
### Fixed | ||
- Change the property name that configuraton is pulled from package.json files. Property was `npmPackageJsonLintConfig`. It is now `npmpackagejsonlint`. | ||
@@ -60,0 +64,0 @@ ### Removed |
{ | ||
"name": "npm-package-json-lint", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Configurable linter for package.json files.", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"eslint": "eslint . --format=node_modules/eslint-formatter-pretty", | ||
"npmpackagejsonlint": "node src/cli.js .", | ||
"npmpackagejsonlint": "node src/cli.js ./package.json", | ||
"lint": "npm run eslint && npm run npmpackagejsonlint", | ||
@@ -54,9 +54,9 @@ "test": "jest", | ||
"devDependencies": { | ||
"eslint": "^6.5.1", | ||
"eslint": "^6.6.0", | ||
"eslint-config-tc": "^8.1.0", | ||
"eslint-formatter-pretty": "^2.1.1", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.19.0", | ||
"eslint-plugin-jest": "^22.20.1", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"figures": "^3.0.0", | ||
"figures": "^3.1.0", | ||
"jest": "^24.9.0", | ||
@@ -63,0 +63,0 @@ "npm-package-json-lint-config-default": "^2.0.0", |
@@ -13,8 +13,14 @@ const debug = require('debug')('npm-package-json-lint:getFileList'); | ||
const getFileList = (patterns, cwd) => { | ||
debug('patterns'); | ||
debug(patterns); | ||
// step 1 - filter out empty entries | ||
const filteredPatterns = patterns.filter(pattern => pattern.length); | ||
debug('filteredPatterns'); | ||
debug(filteredPatterns); | ||
// step 2 - convert directories to globs | ||
const globPatterns = filteredPatterns.map(pattern => { | ||
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}package.json`; | ||
return pattern.endsWith(`${path.sep}package.json`) ? pattern : `${pattern}${path.sep}**${path.sep}package.json`; | ||
}); | ||
@@ -21,0 +27,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148098
3534