eslint-plugin-import
Advanced tools
Comparing version 2.10.0 to 2.11.0
@@ -9,2 +9,10 @@ # Change Log | ||
# [2.11.0] - 2018-04-09 | ||
### Added | ||
- Fixer for [`first`] ([#1046], thanks [@fengkfengk]) | ||
- `allow-require` option for [`no-commonjs`] rule ([#880], thanks [@futpib]) | ||
### Fixed | ||
- memory/CPU regression where ASTs were held in memory ([#1058], thanks [@klimashkin]/[@lukeapage]) | ||
## [2.10.0] - 2018-03-29 | ||
@@ -456,5 +464,7 @@ ### Added | ||
[#1046]: https://github.com/benmosher/eslint-plugin-import/pull/1046 | ||
[#944]: https://github.com/benmosher/eslint-plugin-import/pull/944 | ||
[#891]: https://github.com/benmosher/eslint-plugin-import/pull/891 | ||
[#889]: https://github.com/benmosher/eslint-plugin-import/pull/889 | ||
[#880]: https://github.com/benmosher/eslint-plugin-import/pull/880 | ||
[#858]: https://github.com/benmosher/eslint-plugin-import/pull/858 | ||
@@ -528,2 +538,3 @@ [#843]: https://github.com/benmosher/eslint-plugin-import/pull/843 | ||
[#1058]: https://github.com/benmosher/eslint-plugin-import/issues/1058 | ||
[#886]: https://github.com/benmosher/eslint-plugin-import/issues/886 | ||
@@ -595,3 +606,4 @@ [#863]: https://github.com/benmosher/eslint-plugin-import/issues/863 | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.10.0...HEAD | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.11.0...HEAD | ||
[2.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.10.0...v2.11.0 | ||
[2.10.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.9.0...v2.10.0 | ||
@@ -699,1 +711,5 @@ [2.9.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.8.0...v2.9.0 | ||
[@danny-andrews]: https://github.com/dany-andrews | ||
[@fengkfengk]: https://github.com/fengkfengk | ||
[@futpib]: https://github.com/futpib | ||
[@klimashkin]: https://github.com/klimashkin | ||
[@lukeapage]: https://github.com/lukeapage |
@@ -19,5 +19,5 @@ 'use strict'; | ||
var _builtinModules = require('builtin-modules'); | ||
var _core = require('resolve/lib/core'); | ||
var _builtinModules2 = _interopRequireDefault(_builtinModules); | ||
var _core2 = _interopRequireDefault(_core); | ||
@@ -62,3 +62,3 @@ var _path = require('path'); | ||
const extras = settings && settings['import/core-modules'] || []; | ||
return _builtinModules2.default.indexOf(base) !== -1 || extras.indexOf(base) > -1; | ||
return _core2.default[base] || extras.indexOf(base) > -1; | ||
} | ||
@@ -113,2 +113,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUvaW1wb3J0VHlwZS5qcyJdLCJuYW1lcyI6WyJpc0Fic29sdXRlIiwiaXNCdWlsdEluIiwiaXNFeHRlcm5hbE1vZHVsZU1haW4iLCJpc1Njb3BlZE1haW4iLCJyZXNvbHZlSW1wb3J0VHlwZSIsImNvbnN0YW50IiwidmFsdWUiLCJiYXNlTW9kdWxlIiwibmFtZSIsImlzU2NvcGVkIiwic3BsaXQiLCJzY29wZSIsInBrZyIsImluZGV4T2YiLCJzZXR0aW5ncyIsImJhc2UiLCJleHRyYXMiLCJpc0V4dGVybmFsUGF0aCIsInBhdGgiLCJmb2xkZXJzIiwic29tZSIsImZvbGRlciIsImV4dGVybmFsTW9kdWxlUmVnRXhwIiwiaXNFeHRlcm5hbE1vZHVsZSIsInRlc3QiLCJleHRlcm5hbE1vZHVsZU1haW5SZWdFeHAiLCJzY29wZWRSZWdFeHAiLCJzY29wZWRNYWluUmVnRXhwIiwiaXNJbnRlcm5hbE1vZHVsZSIsImlzUmVsYXRpdmVUb1BhcmVudCIsImluZGV4RmlsZXMiLCJpc0luZGV4IiwiaXNSZWxhdGl2ZVRvU2libGluZyIsInR5cGVUZXN0IiwiY29udGV4dCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7UUFtQmdCQSxVLEdBQUFBLFU7UUFJQUMsUyxH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pbGVzLmluZGV4T2YobmFtZSkgIT09IC0xXG59XG5cbmZ1bmN0aW9uIGlzUmVsYXRpdmVUb1NpYmxpbmcobmFtZSkge1xuICByZXR1cm4gbmFtZS5pbmRleE9mKCcuLycpID09PSAwXG59XG5cbmNvbnN0IHR5cGVUZXN0ID0gY29uZChbXG4gIFtpc0Fic29sdXRlLCBjb25zdGFudCgnYWJzb2x1dGUnKV0sXG4gIFtpc0J1aWx0SW4sIGNvbnN0YW50KCdidWlsdGluJyldLFxuICBbaXNFeHRlcm5hbE1vZHVsZSwgY29uc3RhbnQoJ2V4dGVybmFsJyldLFxuICBbaXNTY29wZWQsIGNvbnN0YW50KCdleHRlcm5hbCcpXSxcbiAgW2lzSW50ZXJuYWxNb2R1bGUsIGNvbnN0YW50KCdpbnRlcm5hbCcpXSxcbiAgW2lzUmVsYXRpdmVUb1BhcmVudCwgY29uc3RhbnQoJ3BhcmVudCcpXSxcbiAgW2lzSW5kZXgsIGNvbnN0YW50KCdpbmRleCcpXSxcbiAgW2lzUmVsYXRpdmVUb1NpYmxpbmcsIGNvbnN0YW50KCdzaWJsaW5nJyldLFxuICBbY29uc3RhbnQodHJ1ZSksIGNvbnN0YW50KCd1bmtub3duJyldLFxuXSlcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gcmVzb2x2ZUltcG9ydFR5cGUobmFtZSwgY29udGV4dCkge1xuICByZXR1cm4gdHlwZVRlc3QobmFtZSwgY29udGV4dC5zZXR0aW5ncywgcmVzb2x2ZShuYW1lLCBjb250ZXh0KSlcbn1cbiJdfQ== |
@@ -293,16 +293,11 @@ 'use strict'; | ||
return ExportMap.for(path, context); | ||
return ExportMap.for(childContext(path, context)); | ||
}; | ||
ExportMap.for = function (path, context) { | ||
let exportMap; | ||
ExportMap.for = function (context) { | ||
const path = context.path; | ||
const cacheKey = (0, _hash.hashObject)({ | ||
settings: context.settings, | ||
parserPath: context.parserPath, | ||
parserOptions: context.parserOptions, | ||
path | ||
}).digest('hex'); | ||
exportMap = exportCache.get(cacheKey); | ||
const cacheKey = (0, _hash.hashObject)(context).digest('hex'); | ||
let exportMap = exportCache.get(cacheKey); | ||
@@ -336,2 +331,3 @@ // return cached ignore | ||
log('cache miss', cacheKey, 'for path', path); | ||
exportMap = ExportMap.parse(path, content, context); | ||
@@ -384,10 +380,10 @@ | ||
function remotePath(node) { | ||
return _resolve2.default.relative(node.source.value, path, context.settings); | ||
function remotePath(value) { | ||
return _resolve2.default.relative(value, path, context.settings); | ||
} | ||
function resolveImport(node) { | ||
const rp = remotePath(node); | ||
function resolveImport(value) { | ||
const rp = remotePath(value); | ||
if (rp == null) return null; | ||
return ExportMap.for(rp, context); | ||
return ExportMap.for(childContext(rp, context)); | ||
} | ||
@@ -415,8 +411,16 @@ | ||
const p = remotePath(declaration); | ||
if (p == null || m.imports.has(p)) return p; | ||
const p = remotePath(declaration.source.value); | ||
if (p == null) return null; | ||
const existing = m.imports.get(p); | ||
if (existing != null) return existing.getter; | ||
const getter = () => ExportMap.for(p, context); | ||
m.imports.set(p, { getter, source: declaration.source }); | ||
return p; | ||
const getter = () => ExportMap.for(childContext(p, context)); | ||
m.imports.set(p, { | ||
getter, | ||
source: { // capturing actual node reference holds full AST in memory! | ||
value: declaration.source.value, | ||
loc: declaration.source.loc | ||
} | ||
}); | ||
return getter; | ||
} | ||
@@ -436,4 +440,4 @@ | ||
if (n.type === 'ExportAllDeclaration') { | ||
const p = captureDependency(n); | ||
if (p) m.dependencies.add(m.imports.get(p).getter); | ||
const getter = captureDependency(n); | ||
if (getter) m.dependencies.add(getter); | ||
return; | ||
@@ -447,3 +451,3 @@ } | ||
if (n.specifiers.some(s => s.type === 'ImportNamespaceSpecifier' && (ns = s))) { | ||
namespaces.set(ns.local.name, n); | ||
namespaces.set(ns.local.name, n.source.value); | ||
} | ||
@@ -473,2 +477,3 @@ return; | ||
const nsource = n.source && n.source.value; | ||
n.specifiers.forEach(s => { | ||
@@ -486,3 +491,3 @@ const exportMeta = {}; | ||
get() { | ||
return resolveImport(n); | ||
return resolveImport(nsource); | ||
} | ||
@@ -503,3 +508,3 @@ })); | ||
// todo: JSDoc | ||
m.reexports.set(s.exported.name, { local, getImport: () => resolveImport(n) }); | ||
m.reexports.set(s.exported.name, { local, getImport: () => resolveImport(nsource) }); | ||
}); | ||
@@ -540,2 +545,18 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkV4cG9ydE1hcC5qcyJdLCJuYW1lcyI6WyJyZWN1cnNpdmVQYXR0ZXJuQ2FwdHVyZSIsInVuYW1iaWd1b3VzIiwibG9nIiwiZXhwb3J0Q2FjaGUiLCJNYXAiLCJFeHBvcnRNYXAiLCJjb25zdHJ1Y3RvciIsInBhdGgiLCJuYW1lc3BhY2UiLCJyZWV4cG9ydHMiLCJkZXBlbmRlbmNpZXMiLCJTZXQiLCJpbXBvcnRzIiwiZXJyb3JzIiwiaGFzRGVmYXVsdCIsImdldCIsInNpemUiLCJmb3JFYWNoIiwiZGVwIiwiaGFzIiwibmFtZSIsImlubmVyTWFwIiwiaGFzRGVlcCIsImZvdW5kIiwiaW1wb3J0ZWQiLCJnZXRJbXBvcnQiLCJsb2NhbCIsImRlZXAiLCJ1bnNoaWZ0IiwiaW5uZXJWYWx1ZSIsInVuZGVmaW5lZCIsImNhbGxiYWNrIiwidGhpc0FyZyIsInYiLCJuIiwiY2FsbCIsInJlZXhwb3J0ZWQiLCJkIiwicmVwb3J0RXJyb3JzIiwiY29udGV4dCIsImRlY2xhcmF0aW9uIiwicmVwb3J0Iiwibm9kZSIsInNvdXJjZSIsIm1lc3NhZ2UiLCJ2YWx1ZSIsIm1hcCIsImUiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwiam9pbiIsImNhcHR1cmVEb2MiLCJkb2NTdHlsZVBhcnNlcnMiLCJtZXRhZGF0YSIsIm5vZGVzIiwiQXJyYXkiLCJwcm90b3R5cGUiLCJzbGljZSIs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nJlYWtcblxuICAgIGNhc2UgJ0FycmF5UGF0dGVybic6XG4gICAgICBwYXR0ZXJuLmVsZW1lbnRzLmZvckVhY2goKGVsZW1lbnQpID0+IHtcbiAgICAgICAgaWYgKGVsZW1lbnQgPT0gbnVsbCkgcmV0dXJuXG4gICAgICAgIHJlY3Vyc2l2ZVBhdHRlcm5DYXB0dXJlKGVsZW1lbnQsIGNhbGxiYWNrKVxuICAgICAgfSlcbiAgICAgIGJyZWFrXG4gIH1cbn1cbiJdfQ== | ||
/** | ||
* don't hold full context object in memory, just grab what we need. | ||
*/ | ||
function childContext(path, context) { | ||
const settings = context.settings, | ||
parserOptions = context.parserOptions, | ||
parserPath = context.parserPath; | ||
return { | ||
settings, | ||
parserOptions, | ||
parserPath, | ||
path | ||
}; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkV4cG9ydE1hcC5qcyJdLCJuYW1lcyI6WyJyZWN1cnNpdmVQYXR0ZXJuQ2FwdHVyZSIsInVuYW1iaWd1b3VzIiwibG9nIiwiZXhwb3J0Q2FjaGUiLCJNYXAiLCJFeHBvcnRNYXAiLCJjb25zdHJ1Y3RvciIsInBhdGgiLCJuYW1lc3BhY2UiLCJyZWV4cG9ydHMiLCJkZXBlbmRlbmNpZXMiLCJTZXQiLCJpbXBvcnRzIiwiZXJyb3JzIiwiaGFzRGVmYXVsdCIsImdldCIsInNpemUiLCJmb3JFYWNoIiwiZGVwIiwiaGFzIiwibmFtZSIsImlubmVyTWFwIiwiaGFzRGVlcCIsImZvdW5kIiwiaW1wb3J0ZWQiLCJnZXRJbXBvcnQiLCJsb2NhbCIsImRlZXAiLCJ1bnNoaWZ0IiwiaW5uZXJWYWx1ZSIsInVuZGVmaW5lZCIsImNhbGxiYWNrIiwidGhpc0FyZyIsInYiLCJuIiwiY2FsbCIsInJlZXhwb3J0ZWQiLCJkIiwicmVwb3J0RXJyb3JzIiwiY29udGV4dCIs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mRlY2xhcmF0aW9uLmlkLm5hbWUsIGNhcHR1cmVEb2MoZG9jU3R5bGVQYXJzZXJzLCBuKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgY2FzZSAnVmFyaWFibGVEZWNsYXJhdGlvbic6XG4gICAgICAgICAgICBuLmRlY2xhcmF0aW9uLmRlY2xhcmF0aW9ucy5mb3JFYWNoKChkKSA9PlxuICAgICAgICAgICAgICByZWN1cnNpdmVQYXR0ZXJuQ2FwdHVyZShkLmlkLFxuICAgICAgICAgICAgICAgIGlkID0+IG0ubmFtZXNwYWNlLnNldChpZC5uYW1lLCBjYXB0dXJlRG9jKGRvY1N0eWxlUGFyc2VycywgZCwgbikpKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgY29uc3QgbnNvdXJjZSA9IG4uc291cmNlICYmIG4uc291cmNlLnZhbHVlXG4gICAgICBuLnNwZWNpZmllcnMuZm9yRWFjaCgocykgPT4ge1xuICAgICAgICBjb25zdCBleHBvcnRNZXRhID0ge31cbiAgICAgICAgbGV0IGxvY2FsXG5cbiAgICAgICAgc3dpdGNoIChzLnR5cGUpIHtcbiAgICAgICAgICBjYXNlICdFeHBvcnREZWZhdWx0U3BlY2lmaWVyJzpcbiAgICAgICAgICAgIGlmICghbi5zb3VyY2UpIHJldHVyblxuICAgICAgICAgICAgbG9jYWwgPSAnZGVmYXVsdCdcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgY2FzZSAnRXhwb3J0TmFtZXNwYWNlU3BlY2lmaWVyJzpcbiAgICAgICAgICAgIG0ubmFtZXNwYWNlLnNldChzLmV4cG9ydGVkLm5hbWUsIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRNZXRhLCAnbmFtZXNwYWNlJywge1xuICAgICAgICAgICAgICBnZXQoKSB7IHJldHVybiByZXNvbHZlSW1wb3J0KG5zb3VyY2UpIH0sXG4gICAgICAgICAgICB9KSlcbiAgIC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09iamVjdFBhdHRlcm4nOlxuICAgICAgcGF0dGVybi5wcm9wZXJ0aWVzLmZvckVhY2gocCA9PiB7XG4gICAgICAgIHJlY3Vyc2l2ZVBhdHRlcm5DYXB0dXJlKHAudmFsdWUsIGNhbGxiYWNrKVxuICAgICAgfSlcbiAgICAgIGJyZWFrXG5cbiAgICBjYXNlICdBcnJheVBhdHRlcm4nOlxuICAgICAgcGF0dGVybi5lbGVtZW50cy5mb3JFYWNoKChlbGVtZW50KSA9PiB7XG4gICAgICAgIGlmIChlbGVtZW50ID09IG51bGwpIHJldHVyblxuICAgICAgICByZWN1cnNpdmVQYXR0ZXJuQ2FwdHVyZShlbGVtZW50LCBjYWxsYmFjaylcbiAgICAgIH0pXG4gICAgICBicmVha1xuICB9XG59XG5cbi8qKlxuICogZG9uJ3QgaG9sZCBmdWxsIGNvbnRleHQgb2JqZWN0IGluIG1lbW9yeSwganVzdCBncmFiIHdoYXQgd2UgbmVlZC5cbiAqL1xuZnVuY3Rpb24gY2hpbGRDb250ZXh0KHBhdGgsIGNvbnRleHQpIHtcbiAgY29uc3QgeyBzZXR0aW5ncywgcGFyc2VyT3B0aW9ucywgcGFyc2VyUGF0aCB9ID0gY29udGV4dFxuICByZXR1cm4ge1xuICAgIHNldHRpbmdzLFxuICAgIHBhcnNlck9wdGlvbnMsXG4gICAgcGFyc2VyUGF0aCxcbiAgICBwYXRoLFxuICB9XG59XG4iXX0= |
@@ -13,3 +13,4 @@ 'use strict'; | ||
url: (0, _docsUrl2.default)('first') | ||
} | ||
}, | ||
fixable: 'code' | ||
}, | ||
@@ -25,7 +26,14 @@ | ||
const body = n.body, | ||
absoluteFirst = context.options[0] === 'absolute-first'; | ||
absoluteFirst = context.options[0] === 'absolute-first', | ||
message = 'Import in body of module; reorder to top.', | ||
sourceCode = context.getSourceCode(), | ||
originSourceCode = sourceCode.getText(); | ||
let nonImportCount = 0, | ||
anyExpressions = false, | ||
anyRelative = false; | ||
body.forEach(function (node) { | ||
anyRelative = false, | ||
lastLegalImp = null, | ||
errorInfos = [], | ||
shouldSort = true, | ||
lastSortNodesIndex = 0; | ||
body.forEach(function (node, index) { | ||
if (!anyExpressions && isPossibleDirective(node)) { | ||
@@ -49,6 +57,21 @@ return; | ||
if (nonImportCount > 0) { | ||
context.report({ | ||
for (let variable of context.getDeclaredVariables(node)) { | ||
if (!shouldSort) break; | ||
const references = variable.references; | ||
if (references.length) { | ||
for (let reference of references) { | ||
if (reference.identifier.range[0] < node.range[1]) { | ||
shouldSort = false; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
shouldSort && (lastSortNodesIndex = errorInfos.length); | ||
errorInfos.push({ | ||
node, | ||
message: 'Import in body of module; reorder to top.' | ||
range: [body[index - 1].range[1], node.range[1]] | ||
}); | ||
} else { | ||
lastLegalImp = node; | ||
} | ||
@@ -59,2 +82,42 @@ } else { | ||
}); | ||
if (!errorInfos.length) return; | ||
errorInfos.forEach(function (errorInfo, index) { | ||
const node = errorInfo.node, | ||
infos = { | ||
node, | ||
message | ||
}; | ||
if (index < lastSortNodesIndex) { | ||
infos.fix = function (fixer) { | ||
return fixer.insertTextAfter(node, ''); | ||
}; | ||
} else if (index === lastSortNodesIndex) { | ||
const sortNodes = errorInfos.slice(0, lastSortNodesIndex + 1); | ||
infos.fix = function (fixer) { | ||
const removeFixers = sortNodes.map(function (_errorInfo) { | ||
return fixer.removeRange(_errorInfo.range); | ||
}), | ||
range = [0, removeFixers[removeFixers.length - 1].range[1]]; | ||
let insertSourceCode = sortNodes.map(function (_errorInfo) { | ||
const nodeSourceCode = String.prototype.slice.apply(originSourceCode, _errorInfo.range); | ||
if (/\S/.test(nodeSourceCode[0])) { | ||
return '\n' + nodeSourceCode; | ||
} | ||
return nodeSourceCode; | ||
}).join(''), | ||
insertFixer = null, | ||
replaceSourceCode = ''; | ||
if (!lastLegalImp) { | ||
insertSourceCode = insertSourceCode.trim() + insertSourceCode.match(/^(\s+)/)[0]; | ||
} | ||
insertFixer = lastLegalImp ? fixer.insertTextAfter(lastLegalImp, insertSourceCode) : fixer.insertTextBefore(body[0], insertSourceCode); | ||
const fixers = [insertFixer].concat(removeFixers); | ||
fixers.forEach(function (computedFixer, i) { | ||
replaceSourceCode += originSourceCode.slice(fixers[i - 1] ? fixers[i - 1].range[1] : 0, computedFixer.range[0]) + computedFixer.text; | ||
}); | ||
return fixer.replaceTextRange(range, replaceSourceCode); | ||
}; | ||
} | ||
context.report(infos); | ||
}); | ||
} | ||
@@ -64,2 +127,2 @@ }; | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL2ZpcnN0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsImNyZWF0ZSIsImNvbnRleHQiLCJpc1Bvc3NpYmxlRGlyZWN0aXZlIiwibm9kZSIsInR5cGUiLCJleHByZXNzaW9uIiwidmFsdWUiLCJuIiwiYm9keSIsImFic29sdXRlRmlyc3QiLCJvcHRpb25zIiwibm9uSW1wb3J0Q291bnQiLCJhbnlFeHByZXNzaW9ucyIsImFueVJlbGF0aXZlIiwiZm9yRWFjaCIsInRlc3QiLCJzb3VyY2UiLCJyZXBvcnQiLCJtZXNzYWdlIl0sIm1hcHBpbmdzIjoiOztBQUFBOzs7Ozs7QUFFQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU07QUFDSkMsV0FBSyx1QkFBUSxPQUFSO0FBREQ7QUFERixHQURTOztBQU9mQyxVQUFRLFVBQVVDLE9BQVYsRUFBbUI7QUFDekIsYUFBU0MsbUJBQVQsQ0FBOEJDLElBQTlCLEVBQW9DO0FBQ2xDLGFBQU9BLEtBQUtDLElBQUwsS0FBYyxxQkFBZCxJQUNMRCxLQUFLRSxVQUFMLENBQWdCRCxJQUFoQixLQUF5QixTQURwQixJQUVMLE9BQU9ELEtBQUtFLFVBQUws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BlID09PSAnSW1wb3J0RGVjbGFyYXRpb24nKSB7XG4gICAgICAgICAgICBpZiAoYWJzb2x1dGVGaXJzdCkge1xuICAgICAgICAgICAgICBpZiAoL15cXC4vLnRlc3Qobm9kZS5zb3VyY2UudmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgYW55UmVsYXRpdmUgPSB0cnVlXG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoYW55UmVsYXRpdmUpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICAgICAgICBub2RlOiBub2RlLnNvdXJjZSxcbiAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdBYnNvbHV0ZSBpbXBvcnRzIHNob3VsZCBjb21lIGJlZm9yZSByZWxhdGl2ZSBpbXBvcnRzLicsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG5vbkltcG9ydENvdW50ID4gMCkge1xuICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAnSW1wb3J0IGluIGJvZHkgb2YgbW9kdWxlOyByZW9yZGVyIHRvIHRvcC4nLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBub25JbXBvcnRDb3VudCsrXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfSxcbiAgICB9XG4gIH0sXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL2ZpcnN0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsImZpeGFibGUiLCJjcmVhdGUiLCJjb250ZXh0IiwiaXNQb3Nz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IG1lc3NhZ2UgPSAnSW1wb3J0IGluIGJvZHkgb2YgbW9kdWxlOyByZW9yZGVyIHRvIHRvcC4nXG4gICAgICAgICAgICAsIHNvdXJjZUNvZGUgPSBjb250ZXh0LmdldFNvdXJjZUNvZGUoKVxuICAgICAgICAgICAgLCBvcmlnaW5Tb3VyY2VDb2RlID0gc291cmNlQ29kZS5nZXRUZXh0KClcbiAgICAgICAgbGV0IG5vbkltcG9ydENvdW50ID0gMFxuICAgICAgICAgICwgYW55RXhwcmVzc2lvbnMgPSBmYWxzZVxuICAgICAgICAgICwgYW55UmVsYXRpdmUgPSBmYWxzZVxuICAgICAgICAgICwgbGFzdExlZ2FsSW1wID0gbnVsbFxuICAgICAgICAgICwgZXJyb3JJbmZvcyA9IFtdXG4gICAgICAgICAgLCBzaG91bGRTb3J0ID0gdHJ1ZVxuICAgICAgICAgICwgbGFzdFNvcnROb2Rlc0luZGV4ID0gMFxuICAgICAgICBib2R5LmZvckVhY2goZnVuY3Rpb24gKG5vZGUsIGluZGV4KXtcbiAgICAgICAgICBpZiAoIWFueUV4cHJlc3Npb25zICYmIGlzUG9zc2libGVEaXJlY3RpdmUobm9kZSkpIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cblxuICAgICAgICAgIGFueUV4cHJlc3Npb25zID0gdHJ1ZVxuXG4gICAgICAgICAgaWYgKG5vZGUudHlwZSA9PT0gJ0ltcG9ydERlY2xhcmF0aW9uJykge1xuICAgICAgICAgICAgaWYgKGFic29sdXRlRmlyc3QpIHtcbiAgICAgICAgICAgICAgaWYgKC9eXFwuLy50ZXN0KG5vZGUuc291cmNlLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGFueVJlbGF0aXZlID0gdHJ1ZVxuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFueVJlbGF0aXZlKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgICAgICAgbm9kZTogbm9kZS5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQWJzb2x1dGUgaW1wb3J0cyBzaG91bGQgY29tZSBiZWZvcmUgcmVsYXRpdmUgaW1wb3J0cy4nLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChub25JbXBvcnRDb3VudCA+IDApIHtcbiAgICAgICAgICAgICAgZm9yIChsZXQgdmFyaWFibGUgb2YgY29udGV4dC5nZXREZWNsYXJlZFZhcmlhYmxlcyhub2RlKSkge1xuICAgICAgICAgICAgICAgIGlmICghc2hvdWxkU29ydCkgYnJlYWtcbiAgICAgICAgICAgICAgICBjb25zdCByZWZlcmVuY2VzID0gdmFyaWFibGUucmVmZXJlbmNlc1xuICAgICAgICAgICAgICAgIGlmIChyZWZlcmVuY2VzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgZm9yIChsZXQgcmVmZXJlbmNlIG9mIHJlZmVyZW5jZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlZmVyZW5jZS5pZGVudGlmaWVyLnJhbmdlWzBdIDwgbm9kZS5yYW5nZVsxXSkge1xuICAgICAgICAgICAgICAgICAgICAgIHNob3VsZFNvcnQgPSBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2hvdWxkU29ydCAmJiAobGFzdFNvcnROb2Rlc0luZGV4ID0gZXJyb3JJbmZvcy5sZW5ndGgpXG4gICAgICAgICAgICAgIGVycm9ySW5mb3MucHVzaCh7XG4gICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICByYW5nZTogW2JvZHlbaW5kZXggLSAxXS5yYW5nZVsxXSwgbm9kZS5yYW5nZVsxXV0sXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBsYXN0TGVnYWxJbXAgPSBub2RlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5vbkltcG9ydENvdW50KytcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICAgIGlmICghZXJyb3JJbmZvcy5sZW5ndGgpIHJldHVyblxuICAgICAgICBlcnJvckluZm9zLmZvckVhY2goZnVuY3Rpb24gKGVycm9ySW5mbywgaW5kZXgpIHtcbiAgICAgICAgICBjb25zdCBub2RlID0gZXJyb3JJbmZvLm5vZGVcbiAgICAgICAgICAgICAgLCBpbmZvcyA9IHtcbiAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2UsXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoaW5kZXggPCBsYXN0U29ydE5vZGVzSW5kZXgpIHtcbiAgICAgICAgICAgIGluZm9zLmZpeCA9IGZ1bmN0aW9uIChmaXhlcikge1xuICAgICAgICAgICAgICByZXR1cm4gZml4ZXIuaW5zZXJ0VGV4dEFmdGVyKG5vZGUsICcnKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoaW5kZXggPT09IGxhc3RTb3J0Tm9kZXNJbmRleCkge1xuICAgICAgICAgICAgY29uc3Qgc29ydE5vZGVzID0gZXJyb3JJbmZvcy5zbGljZSgwLCBsYXN0U29ydE5vZGVzSW5kZXggKyAxKVxuICAgICAgICAgICAgaW5mb3MuZml4ID0gZnVuY3Rpb24gKGZpeGVyKSB7XG4gICAgICAgICAgICAgIGNvbnN0IHJlbW92ZUZpeGVycyA9IHNvcnROb2Rlcy5tYXAoZnVuY3Rpb24gKF9lcnJvckluZm8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZpeGVyLnJlbW92ZVJhbmdlKF9lcnJvckluZm8ucmFuZ2UpXG4gICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgLCByYW5nZSA9IFswLCByZW1vdmVGaXhlcnNbcmVtb3ZlRml4ZXJzLmxlbmd0aCAtIDFdLnJhbmdlWzFdXVxuICAgICAgICAgICAgICBsZXQgaW5zZXJ0U291cmNlQ29kZSA9IHNvcnROb2Rlcy5tYXAoZnVuY3Rpb24gKF9lcnJvckluZm8pIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZVNvdXJjZUNvZGUgPSBTdHJpbmcucHJvdG90eXBlLnNsaWNlLmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICAgIG9yaWdpblNvdXJjZUNvZGUsIF9lcnJvckluZm8ucmFuZ2VcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICBpZiAoL1xcUy8udGVzdChub2RlU291cmNlQ29kZVswXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1xcbicgKyBub2RlU291cmNlQ29kZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlU291cmNlQ29kZVxuICAgICAgICAgICAgICAgICAgfSkuam9pbignJylcbiAgICAgICAgICAgICAgICAsIGluc2VydEZpeGVyID0gbnVsbFxuICAgICAgICAgICAgICAgICwgcmVwbGFjZVNvdXJjZUNvZGUgPSAnJ1xuICAgICAgICAgICAgICBpZiAoIWxhc3RMZWdhbEltcCkge1xuICAgICAgICAgICAgICAgICAgaW5zZXJ0U291cmNlQ29kZSA9XG4gICAgICAgICAgICAgICAgICAgIGluc2VydFNvdXJjZUNvZGUudHJpbSgpICsgaW5zZXJ0U291cmNlQ29kZS5tYXRjaCgvXihcXHMrKS8pWzBdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaW5zZXJ0Rml4ZXIgPSBsYXN0TGVnYWxJbXAgPyBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXhlci5pbnNlcnRUZXh0QWZ0ZXIobGFzdExlZ2FsSW1wLCBpbnNlcnRTb3VyY2VDb2RlKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZml4ZXIuaW5zZXJ0VGV4dEJlZm9yZShib2R5WzBdLCBpbnNlcnRTb3VyY2VDb2RlKVxuICAgICAgICAgICAgICBjb25zdCBmaXhlcnMgPSBbaW5zZXJ0Rml4ZXJdLmNvbmNhdChyZW1vdmVGaXhlcnMpXG4gICAgICAgICAgICAgIGZpeGVycy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wdXRlZEZpeGVyLCBpKSB7XG4gICAgICAgICAgICAgICAgcmVwbGFjZVNvdXJjZUNvZGUgKz0gKG9yaWdpblNvdXJjZUNvZGUuc2xpY2UoXG4gICAgICAgICAgICAgICAgICBmaXhlcnNbaSAtIDFdID8gZml4ZXJzW2kgLSAxXS5yYW5nZVsxXSA6IDAsIGNvbXB1dGVkRml4ZXIucmFuZ2VbMF1cbiAgICAgICAgICAgICAgICApICsgY29tcHV0ZWRGaXhlci50ZXh0KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm4gZml4ZXIucmVwbGFjZVRleHRSYW5nZShyYW5nZSwgcmVwbGFjZVNvdXJjZUNvZGUpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnRleHQucmVwb3J0KGluZm9zKVxuICAgICAgICB9KVxuICAgICAgfSxcbiAgICB9XG4gIH0sXG59XG4iXX0= |
@@ -15,4 +15,11 @@ 'use strict'; | ||
function allowPrimitive(node, context) { | ||
if (context.options.indexOf('allow-primitive-modules') < 0) return false; | ||
function normalizeLegacyOptions(options) { | ||
if (options.indexOf('allow-primitive-modules') >= 0) { | ||
return { allowPrimitiveModules: true }; | ||
} | ||
return options[0] || {}; | ||
} | ||
function allowPrimitive(node, options) { | ||
if (!options.allowPrimitiveModules) return false; | ||
if (node.parent.type !== 'AssignmentExpression') return false; | ||
@@ -22,2 +29,6 @@ return node.parent.right.type !== 'ObjectExpression'; | ||
function allowRequire(node, options) { | ||
return options.allowRequire; | ||
} | ||
//------------------------------------------------------------------------------ | ||
@@ -27,2 +38,11 @@ // Rule Definition | ||
const schemaString = { enum: ['allow-primitive-modules'] }; | ||
const schemaObject = { | ||
type: 'object', | ||
properties: { | ||
allowPrimitiveModules: { 'type': 'boolean' }, | ||
allowRequire: { 'type': 'boolean' } | ||
}, | ||
additionalProperties: false | ||
}; | ||
@@ -33,2 +53,14 @@ module.exports = { | ||
url: (0, _docsUrl2.default)('no-commonjs') | ||
}, | ||
schema: { | ||
anyOf: [{ | ||
type: 'array', | ||
items: [schemaString], | ||
additionalItems: false | ||
}, { | ||
type: 'array', | ||
items: [schemaObject], | ||
additionalItems: false | ||
}] | ||
} | ||
@@ -38,2 +70,3 @@ }, | ||
create: function (context) { | ||
const options = normalizeLegacyOptions(context.options); | ||
@@ -46,3 +79,3 @@ return { | ||
if (node.object.name === 'module' && node.property.name === 'exports') { | ||
if (allowPrimitive(node, context)) return; | ||
if (allowPrimitive(node, options)) return; | ||
context.report({ node, message: EXPORT_MESSAGE }); | ||
@@ -72,2 +105,4 @@ } | ||
if (allowRequire(call, options)) return; | ||
// keeping it simple: all 1-string-arg `require` calls are reported | ||
@@ -82,2 +117,2 @@ context.report({ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLWNvbW1vbmpzLmpzIl0sIm5hbWVzIjpbIkVYUE9SVF9NRVNTQUdFIiwiSU1QT1JUX01FU1NBR0UiLCJhbGxvd1ByaW1pdGl2ZSIsIm5vZGUiLCJjb250ZXh0Iiwib3B0aW9ucyIsImluZGV4T2YiLCJwYXJlbnQiLCJ0eXBlIiwicmlnaHQiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJjcmVhdGUiLCJvYmplY3QiLCJuYW1lIiwicHJvcGVydHkiLCJyZXBvcnQiLC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ICAgICAgaWYgKGNvbnRleHQuZ2V0U2NvcGUoKS50eXBlICE9PSAnbW9kdWxlJykgcmV0dXJuXG4gICAgICAgIGlmIChcbiAgICAgICAgICBjYWxsLnBhcmVudC50eXBlICE9PSAnRXhwcmVzc2lvblN0YXRlbWVudCdcbiAgICAgICAgICAmJiBjYWxsLnBhcmVudC50eXBlICE9PSAnVmFyaWFibGVEZWNsYXJhdG9yJ1xuICAgICAgICApIHJldHVyblxuXG4gICAgICAgIGlmIChjYWxsLmNhbGxlZS50eXBlICE9PSAnSWRlbnRpZmllcicpIHJldHVyblxuICAgICAgICBpZiAoY2FsbC5jYWxsZWUubmFtZSAhPT0gJ3JlcXVpcmUnKSByZXR1cm5cblxuICAgICAgICBpZiAoY2FsbC5hcmd1bWVudHMubGVuZ3RoICE9PSAxKSByZXR1cm5cbiAgICAgICAgdmFyIG1vZHVsZSA9IGNhbGwuYXJndW1lbnRzWzBdXG5cbiAgICAgICAgaWYgKG1vZHVsZS50eXBlICE9PSAnTGl0ZXJhbCcpIHJldHVyblxuICAgICAgICBpZiAodHlwZW9mIG1vZHVsZS52YWx1ZSAhPT0gJ3N0cmluZycpIHJldHVyblxuXG4gICAgICAgIC8vIGtlZXBpbmcgaXQgc2ltcGxlOiBhbGwgMS1zdHJpbmctYXJnIGByZXF1aXJlYCBjYWxscyBhcmUgcmVwb3J0ZWRcbiAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgIG5vZGU6IGNhbGwuY2FsbGVlLFxuICAgICAgICAgIG1lc3NhZ2U6IElNUE9SVF9NRVNTQUdFLFxuICAgICAgICB9KVxuICAgICAgfSxcbiAgICB9XG5cbiAgfSxcbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLWNvbW1vbmpzLmpzIl0sIm5hbWVzIjpbIkVYUE9SVF9NRVNTQUdFIiwiSU1QT1JUX01FU1NBR0Ui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Njb3BlID0gY29udGV4dC5nZXRTY29wZSgpXG4gICAgICAgICAgICAudmFyaWFibGVzXG4gICAgICAgICAgICAuc29tZSh2YXJpYWJsZSA9PiB2YXJpYWJsZS5uYW1lID09PSAnZXhwb3J0cycpXG4gICAgICAgICAgaWYgKCEgaXNJblNjb3BlKSB7XG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IEVYUE9SVF9NRVNTQUdFIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgIH0sXG4gICAgICAnQ2FsbEV4cHJlc3Npb24nOiBmdW5jdGlvbiAoY2FsbCkge1xuICAgICAgICBpZiAoY29udGV4dC5nZXRTY29wZSgpLnR5cGUgIT09ICdtb2R1bGUnKSByZXR1cm5cbiAgICAgICAgaWYgKFxuICAgICAgICAgIGNhbGwucGFyZW50LnR5cGUgIT09ICdFeHByZXNzaW9uU3RhdGVtZW50J1xuICAgICAgICAgICYmIGNhbGwucGFyZW50LnR5cGUgIT09ICdWYXJpYWJsZURlY2xhcmF0b3InXG4gICAgICAgICkgcmV0dXJuXG5cbiAgICAgICAgaWYgKGNhbGwuY2FsbGVlLnR5cGUgIT09ICdJZGVudGlmaWVyJykgcmV0dXJuXG4gICAgICAgIGlmIChjYWxsLmNhbGxlZS5uYW1lICE9PSAncmVxdWlyZScpIHJldHVyblxuXG4gICAgICAgIGlmIChjYWxsLmFyZ3VtZW50cy5sZW5ndGggIT09IDEpIHJldHVyblxuICAgICAgICB2YXIgbW9kdWxlID0gY2FsbC5hcmd1bWVudHNbMF1cblxuICAgICAgICBpZiAobW9kdWxlLnR5cGUgIT09ICdMaXRlcmFsJykgcmV0dXJuXG4gICAgICAgIGlmICh0eXBlb2YgbW9kdWxlLnZhbHVlICE9PSAnc3RyaW5nJykgcmV0dXJuXG5cbiAgICAgICAgaWYgKGFsbG93UmVxdWlyZShjYWxsLCBvcHRpb25zKSkgcmV0dXJuXG5cbiAgICAgICAgLy8ga2VlcGluZyBpdCBzaW1wbGU6IGFsbCAxLXN0cmluZy1hcmcgYHJlcXVpcmVgIGNhbGxzIGFyZSByZXBvcnRlZFxuICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgbm9kZTogY2FsbC5jYWxsZWUsXG4gICAgICAgICAgbWVzc2FnZTogSU1QT1JUX01FU1NBR0UsXG4gICAgICAgIH0pXG4gICAgICB9LFxuICAgIH1cblxuICB9LFxufVxuIl19 |
@@ -37,3 +37,3 @@ 'use strict'; | ||
const myPath = context.getFilename(); | ||
if (myPath === '<text>') return; // can't cycle-check a non-file | ||
if (myPath === '<text>') return {}; // can't cycle-check a non-file | ||
@@ -101,2 +101,2 @@ const options = context.options[0] || {}; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLWN5Y2xlLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsInNjaGVtYSIsIm1heERlcHRoIiwiZGVzY3JpcHRpb24iLCJ0eXBlIiwibWluaW11bSIsImNyZWF0ZSIsImNvbnRleHQiLCJteVBhdGgiLCJnZXRGaWxlbmFtZSIsIm9wdGlvbnMiLCJJbmZpbml0eSIsImNoZWNrU291cmNlVmFsdWUiLCJzb3VyY2VOb2RlIiwiaW1wb3J0ZXIiLCJpbXBvcnRlZCIsImdldCIsInZhbHVlIiwicGF0aCIsInVudHJhdmVyc2VkIiwibWdldCIsInJvdXRlIiwidHJhdmVyc2VkIiwiU2V0IiwiZGV0ZWN0Q3ljbGUiLCJtIiwiaGFzIiwiYWRkIiwiaW1wb3J0cyIsImdldHRlciIsInNvdXJjZSIsImxlbmd0aCIsInB1c2giLCJjb25jYXQiLCJuZXh0Iiwic2hpZnQiLCJtZXNzYWdlIiwicm91dGVTdHJpbmciLCJyZXBvcnQiLCJtYXAiLCJzIiwibG9jIiwic3RhcnQ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ZlcnNlZCA9IG5ldyBTZXQoKVxuICAgICAgZnVuY3Rpb24gZGV0ZWN0Q3ljbGUoe21nZXQsIHJvdXRlfSkge1xuICAgICAgICBjb25zdCBtID0gbWdldCgpXG4gICAgICAgIGlmIChtID09IG51bGwpIHJldHVyblxuICAgICAgICBpZiAodHJhdmVyc2VkLmhhcyhtLnBhdGgpKSByZXR1cm5cbiAgICAgICAgdHJhdmVyc2VkLmFkZChtLnBhdGgpXG5cbiAgICAgICAgZm9yIChsZXQgW3BhdGgsIHsgZ2V0dGVyLCBzb3VyY2UgfV0gb2YgbS5pbXBvcnRzKSB7XG4gICAgICAgICAgaWYgKHBhdGggPT09IG15UGF0aCkgcmV0dXJuIHRydWVcbiAgICAgICAgICBpZiAodHJhdmVyc2VkLmhhcyhwYXRoKSkgY29udGludWVcbiAgICAgICAgICBpZiAocm91dGUubGVuZ3RoICsgMSA8IG1heERlcHRoKSB7XG4gICAgICAgICAgICB1bnRyYXZlcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgbWdldDogZ2V0dGVyLFxuICAgICAgICAgICAgICByb3V0ZTogcm91dGUuY29uY2F0KHNvdXJjZSksXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB3aGlsZSAodW50cmF2ZXJzZWQubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBuZXh0ID0gdW50cmF2ZXJzZWQuc2hpZnQoKSAvLyBiZnMhXG4gICAgICAgIGlmIChkZXRlY3RDeWNsZShuZXh0KSkge1xuICAgICAgICAgIGNvbnN0IG1lc3NhZ2UgPSAobmV4dC5yb3V0ZS5sZW5ndGggPiAwXG4gICAgICAgICAgICA/IGBEZXBlbmRlbmN5IGN5Y2xlIHZpYSAke3JvdXRlU3RyaW5nKG5leHQucm91dGUpfWBcbiAgICAgICAgICAgIDogJ0RlcGVuZGVuY3kgY3ljbGUgZGV0ZWN0ZWQuJylcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbXBvcnRlciwgbWVzc2FnZSlcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKGNoZWNrU291cmNlVmFsdWUsIGNvbnRleHQub3B0aW9uc1swXSlcbiAgfSxcbn1cblxuZnVuY3Rpb24gcm91dGVTdHJpbmcocm91dGUpIHtcbiAgcmV0dXJuIHJvdXRlLm1hcChzID0+IGAke3MudmFsdWV9OiR7cy5sb2Muc3RhcnQubGluZX1gKS5qb2luKCc9PicpXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLWN5Y2xlLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsInNjaGVtYSIsIm1heERlcHRoIiwiZGVzY3JpcHRpb24iLCJ0eXBlIiwibWluaW11bSIsImNyZWF0ZSIsImNvbnRleHQiLCJteVBhdGgiLCJnZXRGaWxlbmFtZSIsIm9wdGlvbnMiLCJJbmZpbml0eSIsImNoZWNrU291cmNlVmFsdWUiLCJzb3VyY2VOb2RlIiwiaW1wb3J0ZXIiLCJpbXBvcnRlZCIsImdldCIsInZhbHVlIiwicGF0aCIsInVudHJhdmVyc2VkIiwibWdldCIsInJvdXRlIiwidHJhdmVyc2VkIiwiU2V0IiwiZGV0ZWN0Q3ljbGUiLCJtIiwiaGFzIiwiYWRkIiwiaW1wb3J0cyIsImdldHRlciIsInNvdXJjZSIsImxlbmd0aCIsInB1c2giLCJjb25jYXQiLCJuZXh0Iiwic2hpZnQiLCJtZXNzYWdlIiwicm91dGVTdHJpbmciLCJyZXBvcnQiLCJtYXAiLCJzIiwibG9jIiwic3RhcnQiLCJsaW5lIiwiam9pbiJdLCJtYXBwaW5ncyI6Ijs7eXBCQUFBOzs7OztBQUtBOzs7O0FBQ0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Rpb24gZGV0ZWN0Q3ljbGUoe21nZXQsIHJvdXRlfSkge1xuICAgICAgICBjb25zdCBtID0gbWdldCgpXG4gICAgICAgIGlmIChtID09IG51bGwpIHJldHVyblxuICAgICAgICBpZiAodHJhdmVyc2VkLmhhcyhtLnBhdGgpKSByZXR1cm5cbiAgICAgICAgdHJhdmVyc2VkLmFkZChtLnBhdGgpXG5cbiAgICAgICAgZm9yIChsZXQgW3BhdGgsIHsgZ2V0dGVyLCBzb3VyY2UgfV0gb2YgbS5pbXBvcnRzKSB7XG4gICAgICAgICAgaWYgKHBhdGggPT09IG15UGF0aCkgcmV0dXJuIHRydWVcbiAgICAgICAgICBpZiAodHJhdmVyc2VkLmhhcyhwYXRoKSkgY29udGludWVcbiAgICAgICAgICBpZiAocm91dGUubGVuZ3RoICsgMSA8IG1heERlcHRoKSB7XG4gICAgICAgICAgICB1bnRyYXZlcnNlZC5wdXNoKHtcbiAgICAgICAgICAgICAgbWdldDogZ2V0dGVyLFxuICAgICAgICAgICAgICByb3V0ZTogcm91dGUuY29uY2F0KHNvdXJjZSksXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB3aGlsZSAodW50cmF2ZXJzZWQubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBuZXh0ID0gdW50cmF2ZXJzZWQuc2hpZnQoKSAvLyBiZnMhXG4gICAgICAgIGlmIChkZXRlY3RDeWNsZShuZXh0KSkge1xuICAgICAgICAgIGNvbnN0IG1lc3NhZ2UgPSAobmV4dC5yb3V0ZS5sZW5ndGggPiAwXG4gICAgICAgICAgICA/IGBEZXBlbmRlbmN5IGN5Y2xlIHZpYSAke3JvdXRlU3RyaW5nKG5leHQucm91dGUpfWBcbiAgICAgICAgICAgIDogJ0RlcGVuZGVuY3kgY3ljbGUgZGV0ZWN0ZWQuJylcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbXBvcnRlciwgbWVzc2FnZSlcbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKGNoZWNrU291cmNlVmFsdWUsIGNvbnRleHQub3B0aW9uc1swXSlcbiAgfSxcbn1cblxuZnVuY3Rpb24gcm91dGVTdHJpbmcocm91dGUpIHtcbiAgcmV0dXJuIHJvdXRlLm1hcChzID0+IGAke3MudmFsdWV9OiR7cy5sb2Muc3RhcnQubGluZX1gKS5qb2luKCc9PicpXG59XG4iXX0= |
{ | ||
"name": "eslint-plugin-import", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "Import with sanity.", | ||
@@ -82,3 +82,2 @@ "engines": { | ||
"dependencies": { | ||
"builtin-modules": "^1.1.1", | ||
"contains-path": "^0.1.0", | ||
@@ -92,3 +91,4 @@ "debug": "^2.6.8", | ||
"minimatch": "^3.0.3", | ||
"read-pkg-up": "^2.0.0" | ||
"read-pkg-up": "^2.0.0", | ||
"resolve": "^1.6.0" | ||
}, | ||
@@ -95,0 +95,0 @@ "nyc": { |
@@ -25,3 +25,3 @@ # eslint-plugin-import | ||
* Prevent importing the submodules of other modules ([`no-internal-modules`]) | ||
* Forbid Webpack loader syntax in imports ([`no-webpack-loader-syntax`]) | ||
* Forbid webpack loader syntax in imports ([`no-webpack-loader-syntax`]) | ||
* Forbid a module from importing itself ([`no-self-import`]) | ||
@@ -149,3 +149,3 @@ * Forbid a module from importing a module with a dependency path back to itself ([`no-cycle`]) | ||
However, Webpack allows a number of things in import module source strings that | ||
However, webpack allows a number of things in import module source strings that | ||
Node does not, such as loaders (`import 'file!./whatever'`) and a number of | ||
@@ -157,3 +157,3 @@ aliasing schemes, such as [`externals`]: mapping a module id to a global name at | ||
Currently [Node] and [Webpack] resolution have been implemented, but the | ||
Currently [Node] and [webpack] resolution have been implemented, but the | ||
resolvers are just npm packages, so [third party packages are supported](https://github.com/benmosher/eslint-plugin-import/wiki/Resolvers) (and encouraged!). | ||
@@ -224,3 +224,3 @@ | ||
[Node]: https://www.npmjs.com/package/eslint-import-resolver-node | ||
[Webpack]: https://www.npmjs.com/package/eslint-import-resolver-webpack | ||
[webpack]: https://www.npmjs.com/package/eslint-import-resolver-webpack | ||
@@ -310,3 +310,3 @@ # Settings | ||
configured ESLint parser. This is useful if you're inter-op-ing with TypeScript | ||
directly using Webpack, for example: | ||
directly using webpack, for example: | ||
@@ -313,0 +313,0 @@ ```yaml |
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
483708
3457
+ Addedresolve@^1.6.0
- Removedbuiltin-modules@^1.1.1
- Removedbuiltin-modules@1.1.1(transitive)