diff --git a/lib/util/get-npmignore.js b/lib/util/get-npmignore.js index 0e8699e6..9940e3f8 100644 --- a/lib/util/get-npmignore.js +++ b/lib/util/get-npmignore.js @@ -24,7 +24,7 @@ const NEVER_IGNORED = /^(?:readme\.[^.]*|(?:licen[cs]e|changes|changelog|history * @returns {boolean} `true` if the file name is a relative path to a ancestor * directory. */ -function notAncestorFiles(filePath) { +function isAncestorFiles(filePath) { return PARENT_RELATIVE_PATH.test(filePath) } @@ -124,7 +124,7 @@ function parseNpmignore(basedir, filesFieldExists) { } /** - * Gets an object to check whether or not a given path should be ignored. + * Gets an object to check whether a given path should be ignored or not. * The object is created from: * * - `files` field of `package.json` @@ -137,7 +137,7 @@ function parseNpmignore(basedir, filesFieldExists) { * `match` returns `true` if a given file path should be ignored. */ module.exports = function getNpmignore(startPath) { - const retv = { match: notAncestorFiles } + const retv = { match: isAncestorFiles } const p = getPackageJson(startPath) if (p) { @@ -155,17 +155,17 @@ module.exports = function getNpmignore(startPath) { if (filesIgnore && npmignoreIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, filesIgnore, npmignoreIgnore) + or(isAncestorFiles, filesIgnore, npmignoreIgnore) ) } else if (filesIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, filesIgnore) + or(isAncestorFiles, filesIgnore) ) } else if (npmignoreIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, npmignoreIgnore) + or(isAncestorFiles, npmignoreIgnore) ) }