eslint-plugin-import
Advanced tools
Comparing version 2.18.2 to 2.19.0
152
CHANGELOG.md
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
@@ -8,18 +9,48 @@ This project adheres to [Semantic Versioning](http://semver.org/). | ||
## [2.19.0] - 2019-12-08 | ||
### Added | ||
- [`internal-regex`]: regex pattern for marking packages "internal" ([#1491], thanks [@Librazy]) | ||
- [`group-exports`]: make aggregate module exports valid ([#1472], thanks [@atikenny]) | ||
- [`no-namespace`]: Make rule fixable ([#1401], thanks [@TrevorBurnham]) | ||
- support `parseForESLint` from custom parser ([#1435], thanks [@JounQin]) | ||
- [`no-extraneous-dependencies`]: Implement support for [bundledDependencies](https://npm.github.io/using-pkgs-docs/package-json/types/bundleddependencies.html) ([#1436], thanks [@schmidsi])) | ||
- [`no-unused-modules`]: add flow type support ([#1542], thanks [@rfermann]) | ||
- [`order`]: Adds support for pathGroups to allow ordering by defined patterns ([#795], [#1386], thanks [@Mairu]) | ||
- [`no-duplicates`]: Add `considerQueryString` option : allow duplicate imports with different query strings ([#1107], thanks [@pcorpet]). | ||
- [`order`]: Add support for alphabetical sorting of import paths within import groups ([#1360], [#1105], [#629], thanks [@duncanbeevers], [@stropho], [@luczsoma], [@randallreedjr]) | ||
- [`no-commonjs`]: add `allowConditionalRequire` option ([#1439], thanks [@Pessimistress]) | ||
### Fixed | ||
- [`default`]: make error message less confusing ([#1470], thanks [@golopot]) | ||
- Improve performance of `ExportMap.for` by only loading paths when necessary. ([#1519], thanks [@brendo]) | ||
- Support export of a merged TypeScript namespace declaration ([#1495], thanks [@benmunro]) | ||
- [`order`]: fix autofix to not move imports across fn calls ([#1253], thanks [@tihonove]) | ||
- [`prefer-default-export`]: fix false positive with type export ([#1506], thanks [@golopot]) | ||
- [`extensions`]: Fix `ignorePackages` to produce errors ([#1521], thanks [@saschanaz]) | ||
- [`no-unused-modules`]: fix crash due to `export *` ([#1496], thanks [@Taranys]) | ||
- [`no-cycle`]: should not warn for Flow imports ([#1494], thanks [@maxmalov]) | ||
- [`order`]: fix `@someModule` considered as `unknown` instead of `internal` ([#1493], thanks [@aamulumi]) | ||
- [`no-extraneous-dependencies`]: Check `export from` ([#1049], thanks [@marcusdarmstrong]) | ||
### Docs | ||
- [`no-useless-path-segments`]: add docs for option `commonjs` ([#1507], thanks [@golopot]) | ||
### Changed | ||
- [`no-unused-modules`]/`eslint-module-utils`: Avoid superfluous calls and code ([#1551], thanks [@brettz9]) | ||
## [2.18.2] - 2019-07-19 | ||
- Skip warning on type interfaces ([#1425], thanks [@lencioni]) | ||
### Fixed | ||
- Skip warning on type interfaces ([#1425], thanks [@lencioni]) | ||
## [2.18.1] - 2019-07-18 | ||
### Fixed | ||
- Improve parse perf when using `@typescript-eslint/parser` ([#1409], thanks [@bradzacher]) | ||
- [`prefer-default-export`]: don't warn on TypeAlias & TSTypeAliasDeclaration ([#1377], thanks [@sharmilajesupaul]) | ||
- [`no-unused-modules`]: Exclude package "main"/"bin"/"browser" entry points ([#1404], thanks [@rfermann]) | ||
- [`export`]: false positive for typescript overloads ([#1412], thanks [@golopot]) | ||
- Improve parse perf when using `@typescript-eslint/parser` ([#1409], thanks [@bradzacher]) | ||
- [`prefer-default-export`]: don't warn on TypeAlias & TSTypeAliasDeclaration ([#1377], thanks [@sharmilajesupaul]) | ||
- [`no-unused-modules`]: Exclude package "main"/"bin"/"browser" entry points ([#1404], thanks [@rfermann]) | ||
- [`export`]: false positive for TypeScript overloads ([#1412], thanks [@golopot]) | ||
### Refactors | ||
- [`no-extraneous-dependencies`], `importType`: remove lodash ([#1419], thanks [@ljharb]) | ||
- [`no-extraneous-dependencies`], `importType`: remove lodash ([#1419], thanks [@ljharb]) | ||
## [2.18.0] - 2019-06-24 | ||
### Added | ||
@@ -29,3 +60,3 @@ - Support eslint v6 ([#1393], thanks [@sheepsteak]) | ||
- [`order`]: add fixer for destructuring commonjs import ([#1372], thanks [@golopot]) | ||
- typescript config: add TS def extensions + defer to TS over JS ([#1366], thanks [@benmosher]) | ||
- TypeScript config: add TS def extensions + defer to TS over JS ([#1366], thanks [@benmosher]) | ||
@@ -40,3 +71,2 @@ ### Fixed | ||
## [2.17.3] - 2019-05-23 | ||
### Fixed | ||
@@ -49,3 +79,3 @@ - [`no-common-js`]: Also throw an error when assigning ([#1354], thanks [@charlessuh]) | ||
- [refactor] fix eslint 6 compat by fixing imports (thank [@ljharb]) | ||
- Improve support for Typescript declare structures ([#1356], thanks [@christophercurrie]) | ||
- Improve support for TypeScript declare structures ([#1356], thanks [@christophercurrie]) | ||
@@ -55,7 +85,5 @@ ### Docs | ||
- [`no-unused-modules`]: Indicates usage, plugin defaults to no-op, and add description to main README.md ([#1352], thanks [@johndevedu]) | ||
[@christophercurrie]: https://github.com/christophercurrie | ||
- Document `env` option for `eslint-import-resolver-webpack` ([#1363], thanks [@kgregory]) | ||
## [2.17.2] - 2019-04-16 | ||
### Fixed | ||
@@ -66,3 +94,2 @@ - [`no-unused-modules`]: avoid crash when using `ignoreExports`-option ([#1331], [#1323], thanks [@rfermann]) | ||
## [2.17.1] - 2019-04-13 | ||
### Fixed | ||
@@ -72,3 +99,2 @@ - require v2.4 of `eslint-module-utils` ([#1322]) | ||
## [2.17.0] - 2019-04-13 | ||
### Added | ||
@@ -78,3 +104,3 @@ - [`no-useless-path-segments`]: Add `noUselessIndex` option ([#1290], thanks [@timkraut]) | ||
- Add [`no-unused-modules`] rule ([#1142], thanks [@rfermann]) | ||
- support export type named exports from typescript ([#1304], thanks [@bradennapier] and [@schmod]) | ||
- support export type named exports from TypeScript ([#1304], thanks [@bradennapier] and [@schmod]) | ||
@@ -88,7 +114,7 @@ ### Fixed | ||
- Fix overwriting of dynamic import() CallExpression ([`no-cycle`], [`no-relative-parent-import`], [`no-unresolved`], [`no-useless-path-segments`]) ([#1218], [#1166], [#1035], thanks [@vikr01]) | ||
- [`export`]: false positives for typescript type + value export ([#1319], thanks [@bradzacher]) | ||
- [`export`]: Support typescript namespaces ([#1320], [#1300], thanks [@bradzacher]) | ||
- [`export`]: false positives for TypeScript type + value export ([#1319], thanks [@bradzacher]) | ||
- [`export`]: Support TypeScript namespaces ([#1320], [#1300], thanks [@bradzacher]) | ||
### Docs | ||
- Update readme for Typescript ([#1256], [#1277], thanks [@kirill-konshin]) | ||
- Update readme for TypeScript ([#1256], [#1277], thanks [@kirill-konshin]) | ||
- make rule names consistent ([#1112], thanks [@feychenie]) | ||
@@ -100,3 +126,2 @@ | ||
## [2.16.0] - 2019-01-29 | ||
@@ -118,9 +143,3 @@ ### Added | ||
## [2.14.0] - 2018-08-13 | ||
* 69e0187 (HEAD -> master, source/master, origin/master, origin/HEAD) Merge pull request #1151 from jf248/jsx | ||
|\ | ||
| * e30a757 (source/pr/1151, fork/jsx) Add JSX check to namespace rule | ||
|/ | ||
* 8252344 (source/pr/1148) Add error to output when module loaded as resolver has invalid API | ||
### Added | ||
@@ -134,3 +153,3 @@ - [`no-useless-path-segments`]: add commonJS (CJS) support ([#1128], thanks [@1pete]) | ||
- [`no-relative-parent-imports`]: resolve paths ([#1135], thanks [@chrislloyd]) | ||
- [`import/order`]: fix autofixer when using typescript-eslint-parser ([#1137], thanks [@justinanastos]) | ||
- [`order`]: fix autofixer when using typescript-eslint-parser ([#1137], thanks [@justinanastos]) | ||
- repeat fix from [#797] for [#717], in another place (thanks [@ljharb]) | ||
@@ -484,7 +503,6 @@ | ||
### Added | ||
- Added an [`ignore`](./docs/rules/no-unresolved.md#ignore) option to [`no-unresolved`] for those pesky files that no | ||
resolver can find. (still prefer enhancing the Webpack and Node resolvers to | ||
using it, though). See [#89] for details. | ||
- Added an [`ignore`](./docs/rules/no-unresolved.md#ignore) option to [`no-unresolved`] for those pesky files that no resolver can find. (still prefer enhancing the Webpack and Node resolvers to using it, though). See [#89] for details. | ||
## [1.0.4] - 2016-03-11 | ||
### Changed | ||
@@ -498,2 +516,3 @@ - respect hoisting for deep namespaces ([`namespace`]/[`no-deprecated`]) ([#211]) | ||
## [1.0.3] - 2016-02-26 | ||
### Changed | ||
@@ -503,6 +522,6 @@ - no-deprecated follows deep namespaces ([#191]) | ||
### Fixed | ||
- [`namespace`] no longer flags modules with only a default export as having no | ||
names. (ns.default is valid ES6) | ||
- [`namespace`] no longer flags modules with only a default export as having no names. (ns.default is valid ES6) | ||
## [1.0.2] - 2016-02-26 | ||
### Fixed | ||
@@ -512,2 +531,3 @@ - don't parse imports with no specifiers ([#192]) | ||
## [1.0.1] - 2016-02-25 | ||
### Fixed | ||
@@ -519,5 +539,5 @@ - export `stage-0` shared config | ||
## [1.0.0] - 2016-02-24 | ||
### Added | ||
- [`no-deprecated`]: WIP rule to let you know at lint time if you're using | ||
deprecated functions, constants, classes, or modules. | ||
- [`no-deprecated`]: WIP rule to let you know at lint time if you're using deprecated functions, constants, classes, or modules. | ||
@@ -528,9 +548,9 @@ ### Changed | ||
## [1.0.0-beta.0] - 2016-02-13 | ||
### Changed | ||
- support for (only) ESLint 2.x | ||
- no longer needs/refers to `import/parser` or `import/parse-options`. Instead, | ||
ESLint provides the configured parser + options to the rules, and they use that | ||
to parse dependencies. | ||
- no longer needs/refers to `import/parser` or `import/parse-options`. Instead, ESLint provides the configured parser + options to the rules, and they use that to parse dependencies. | ||
### Removed | ||
- `babylon` as default import parser (see Breaking) | ||
@@ -555,10 +575,7 @@ | ||
### Changed | ||
- Ignore [`import/ignore` setting] if exports are actually found in the parsed module. Does | ||
this to support use of `jsnext:main` in `node_modules` without the pain of | ||
managing an allow list or a nuanced deny list. | ||
- Ignore [`import/ignore` setting] if exports are actually found in the parsed module. Does this to support use of `jsnext:main` in `node_modules` without the pain of managing an allow list or a nuanced deny list. | ||
## [0.11.0] - 2015-11-27 | ||
### Added | ||
- Resolver plugins. Now the linter can read Webpack config, properly follow | ||
aliases and ignore externals, dismisses inline loaders, etc. etc.! | ||
- Resolver plugins. Now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.! | ||
@@ -620,2 +637,17 @@ ## Earlier releases (0.10.1 and younger) | ||
[#1551]: https://github.com/benmosher/eslint-plugin-import/pull/1551 | ||
[#1542]: https://github.com/benmosher/eslint-plugin-import/pull/1542 | ||
[#1521]: https://github.com/benmosher/eslint-plugin-import/pull/1521 | ||
[#1519]: https://github.com/benmosher/eslint-plugin-import/pull/1519 | ||
[#1507]: https://github.com/benmosher/eslint-plugin-import/pull/1507 | ||
[#1506]: https://github.com/benmosher/eslint-plugin-import/pull/1506 | ||
[#1496]: https://github.com/benmosher/eslint-plugin-import/pull/1496 | ||
[#1495]: https://github.com/benmosher/eslint-plugin-import/pull/1495 | ||
[#1494]: https://github.com/benmosher/eslint-plugin-import/pull/1494 | ||
[#1493]: https://github.com/benmosher/eslint-plugin-import/pull/1493 | ||
[#1472]: https://github.com/benmosher/eslint-plugin-import/pull/1472 | ||
[#1470]: https://github.com/benmosher/eslint-plugin-import/pull/1470 | ||
[#1439]: https://github.com/benmosher/eslint-plugin-import/pull/1439 | ||
[#1436]: https://github.com/benmosher/eslint-plugin-import/pull/1436 | ||
[#1435]: https://github.com/benmosher/eslint-plugin-import/pull/1435 | ||
[#1425]: https://github.com/benmosher/eslint-plugin-import/pull/1425 | ||
@@ -626,4 +658,6 @@ [#1419]: https://github.com/benmosher/eslint-plugin-import/pull/1419 | ||
[#1404]: https://github.com/benmosher/eslint-plugin-import/pull/1404 | ||
[#1401]: https://github.com/benmosher/eslint-plugin-import/pull/1401 | ||
[#1393]: https://github.com/benmosher/eslint-plugin-import/pull/1393 | ||
[#1389]: https://github.com/benmosher/eslint-plugin-import/pull/1389 | ||
[#1386]: https://github.com/benmosher/eslint-plugin-import/pull/1386 | ||
[#1377]: https://github.com/benmosher/eslint-plugin-import/pull/1377 | ||
@@ -635,2 +669,3 @@ [#1375]: https://github.com/benmosher/eslint-plugin-import/pull/1375 | ||
[#1363]: https://github.com/benmosher/eslint-plugin-import/pull/1363 | ||
[#1360]: https://github.com/benmosher/eslint-plugin-import/pull/1360 | ||
[#1358]: https://github.com/benmosher/eslint-plugin-import/pull/1358 | ||
@@ -658,2 +693,3 @@ [#1356]: https://github.com/benmosher/eslint-plugin-import/pull/1356 | ||
[#1257]: https://github.com/benmosher/eslint-plugin-import/pull/1257 | ||
[#1253]: https://github.com/benmosher/eslint-plugin-import/pull/1253 | ||
[#1235]: https://github.com/benmosher/eslint-plugin-import/pull/1235 | ||
@@ -674,6 +710,9 @@ [#1234]: https://github.com/benmosher/eslint-plugin-import/pull/1234 | ||
[#1112]: https://github.com/benmosher/eslint-plugin-import/pull/1112 | ||
[#1107]: https://github.com/benmosher/eslint-plugin-import/pull/1107 | ||
[#1106]: https://github.com/benmosher/eslint-plugin-import/pull/1106 | ||
[#1105]: https://github.com/benmosher/eslint-plugin-import/pull/1105 | ||
[#1093]: https://github.com/benmosher/eslint-plugin-import/pull/1093 | ||
[#1085]: https://github.com/benmosher/eslint-plugin-import/pull/1085 | ||
[#1068]: https://github.com/benmosher/eslint-plugin-import/pull/1068 | ||
[#1049]: https://github.com/benmosher/eslint-plugin-import/pull/1049 | ||
[#1046]: https://github.com/benmosher/eslint-plugin-import/pull/1046 | ||
@@ -704,2 +743,3 @@ [#944]: https://github.com/benmosher/eslint-plugin-import/pull/944 | ||
[#630]: https://github.com/benmosher/eslint-plugin-import/pull/630 | ||
[#629]: https://github.com/benmosher/eslint-plugin-import/pull/629 | ||
[#628]: https://github.com/benmosher/eslint-plugin-import/pull/628 | ||
@@ -755,3 +795,2 @@ [#596]: https://github.com/benmosher/eslint-plugin-import/pull/596 | ||
[#157]: https://github.com/benmosher/eslint-plugin-import/pull/157 | ||
[#1366]: https://github.com/benmosher/eslint-plugin-import/issues/1366 | ||
@@ -776,2 +815,3 @@ [#1334]: https://github.com/benmosher/eslint-plugin-import/issues/1334 | ||
[#839]: https://github.com/benmosher/eslint-plugin-import/issues/839 | ||
[#795]: https://github.com/benmosher/eslint-plugin-import/issues/795 | ||
[#793]: https://github.com/benmosher/eslint-plugin-import/issues/793 | ||
@@ -841,3 +881,6 @@ [#720]: https://github.com/benmosher/eslint-plugin-import/issues/720 | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.0...HEAD | ||
[Unreleased]: https://github.com/benmosher/eslint-plugin-import/compare/v2.19.0...HEAD | ||
[2.19.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.2...v2.19.0 | ||
[2.18.2]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.1...v2.18.2 | ||
[2.18.1]: https://github.com/benmosher/eslint-plugin-import/compare/v2.18.0...v2.18.1 | ||
[2.18.0]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0 | ||
@@ -902,3 +945,2 @@ [2.17.3]: https://github.com/benmosher/eslint-plugin-import/compare/v2.17.2...v2.17.3 | ||
[0.11.0]: https://github.com/benmosher/eslint-plugin-import/compare/v0.10.1...v0.11.0 | ||
[@mathieudutour]: https://github.com/mathieudutour | ||
@@ -1002,1 +1044,21 @@ [@gausie]: https://github.com/gausie | ||
[@lencioni]: https://github.com/lencioni | ||
[@JounQin]: https://github.com/JounQin | ||
[@atikenny]: https://github.com/atikenny | ||
[@schmidsi]: https://github.com/schmidsi | ||
[@TrevorBurnham]: https://github.com/TrevorBurnham | ||
[@benmunro]: https://github.com/benmunro | ||
[@tihonove]: https://github.com/tihonove | ||
[@brendo]: https://github.com/brendo | ||
[@saschanaz]: https://github.com/saschanaz | ||
[@brettz9]: https://github.com/brettz9 | ||
[@Taranys]: https://github.com/Taranys | ||
[@maxmalov]: https://github.com/maxmalov | ||
[@marcusdarmstrong]: https://github.com/marcusdarmstrong | ||
[@Mairu]: https://github.com/Mairu | ||
[@aamulumi]: https://github.com/aamulumi | ||
[@pcorpet]: https://github.com/pcorpet | ||
[@stropho]: https://github.com/stropho | ||
[@luczsoma]: https://github.com/luczsoma | ||
[@christophercurrie]: https://github.com/christophercurrie | ||
[@randallreedjr]: https://github.com/randallreedjr | ||
[@Pessimistress]: https://github.com/Pessimistress |
@@ -12,4 +12,4 @@ /** | ||
, 'import/default': 2 | ||
, 'import/export': 2 | ||
} | ||
, 'import/export': 2, | ||
}, | ||
} |
@@ -19,3 +19,3 @@ /** | ||
'import/no-named-as-default-member': 'warn', | ||
'import/no-duplicates': 'warn' | ||
'import/no-duplicates': 'warn', | ||
}, | ||
@@ -22,0 +22,0 @@ |
@@ -11,3 +11,3 @@ /** | ||
'import/no-deprecated': 1, | ||
} | ||
}, | ||
} |
@@ -5,3 +5,3 @@ /** | ||
var allExtensions = ['.ts', '.tsx', '.d.ts', '.js', '.jsx']; | ||
var allExtensions = ['.ts', '.tsx', '.d.ts', '.js', '.jsx'] | ||
@@ -13,11 +13,11 @@ module.exports = { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'] | ||
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'], | ||
}, | ||
'import/resolver': { | ||
'node': { | ||
'extensions': allExtensions | ||
} | ||
} | ||
} | ||
'extensions': allExtensions, | ||
}, | ||
}, | ||
}, | ||
} |
@@ -77,3 +77,3 @@ 'use strict'; | ||
const scopedRegExp = /^@[^/]+\/[^/]+/; | ||
const scopedRegExp = /^@[^/]+\/?[^/]+/; | ||
function isScoped(name) { | ||
@@ -89,4 +89,5 @@ return scopedRegExp.test(name); | ||
function isInternalModule(name, settings, path) { | ||
const internalScope = settings && settings['import/internal-regex']; | ||
const matchesScopedOrExternalRegExp = scopedRegExp.test(name) || externalModuleRegExp.test(name); | ||
return matchesScopedOrExternalRegExp && !isExternalPath(path, name, settings); | ||
return matchesScopedOrExternalRegExp && (internalScope && new RegExp(internalScope).test(name) || !isExternalPath(path, name, settings)); | ||
} | ||
@@ -140,2 +141,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL2ltcG9ydFR5cGUuanMiXSwibmFtZXMiOlsiaXNBYnNvbHV0ZSIsImlzQnVpbHRJbiIsImlzRXh0ZXJuYWxNb2R1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dHlwZVRlc3QobmFtZSwgc2V0dGluZ3MsIHBhdGgpIHtcbiAgaWYgKGlzQWJzb2x1dGUobmFtZSwgc2V0dGluZ3MsIHBhdGgpKSB7IHJldHVybiAnYWJzb2x1dGUnIH1cbiAgaWYgKGlzQnVpbHRJbihuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdidWlsdGluJyB9XG4gIGlmIChpc0ludGVybmFsTW9kdWxlKG5hbWUsIHNldHRpbmdzLCBwYXRoKSkgeyByZXR1cm4gJ2ludGVybmFsJyB9XG4gIGlmIChpc0V4dGVybmFsTW9kdWxlKG5hbWUsIHNldHRpbmdzLCBwYXRoKSkgeyByZXR1cm4gJ2V4dGVybmFsJyB9XG4gIGlmIChpc1Njb3BlZChuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdleHRlcm5hbCcgfVxuICBpZiAoaXNSZWxhdGl2ZVRvUGFyZW50KG5hbWUsIHNldHRpbmdzLCBwYXRoKSkgeyByZXR1cm4gJ3BhcmVudCcgfVxuICBpZiAoaXNJbmRleChuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdpbmRleCcgfVxuICBpZiAoaXNSZWxhdGl2ZVRvU2libGluZyhuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdzaWJsaW5nJyB9XG4gIHJldHVybiAndW5rbm93bidcbn1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gcmVzb2x2ZUltcG9ydFR5cGUobmFtZSwgY29udGV4dCkge1xuICByZXR1cm4gdHlwZVRlc3QobmFtZSwgY29udGV4dC5zZXR0aW5ncywgcmVzb2x2ZShuYW1lLCBjb250ZXh0KSlcbn1cbiJdfQ== |
@@ -343,7 +343,14 @@ 'use strict'; | ||
// check for and cache ignore | ||
if ((0, _ignore2.default)(path, context)) { | ||
log('ignored path due to ignore settings:', path); | ||
exportCache.set(cacheKey, null); | ||
return null; | ||
} | ||
const content = _fs2.default.readFileSync(path, { encoding: 'utf8' }); | ||
// check for and cache ignore | ||
if ((0, _ignore2.default)(path, context) || !unambiguous.test(content)) { | ||
log('ignored path due to unambiguous regex or ignore settings:', path); | ||
// check for and cache unambigious modules | ||
if (!unambiguous.test(content)) { | ||
log('ignored path due to unambiguous regex:', path); | ||
exportCache.set(cacheKey, null); | ||
@@ -430,10 +437,15 @@ return null; | ||
if (declaration.source == null) return null; | ||
if (declaration.importKind === 'type') return null; // skip Flow type imports | ||
const importedSpecifiers = new Set(); | ||
const supportedTypes = new Set(['ImportDefaultSpecifier', 'ImportNamespaceSpecifier']); | ||
let hasImportedType = false; | ||
if (declaration.specifiers) { | ||
declaration.specifiers.forEach(specifier => { | ||
if (supportedTypes.has(specifier.type)) { | ||
const isType = specifier.importKind === 'type'; | ||
hasImportedType = hasImportedType || isType; | ||
if (supportedTypes.has(specifier.type) && !isType) { | ||
importedSpecifiers.add(specifier.type); | ||
} | ||
if (specifier.type === 'ImportSpecifier') { | ||
if (specifier.type === 'ImportSpecifier' && !isType) { | ||
importedSpecifiers.add(specifier.imported.name); | ||
@@ -444,2 +456,5 @@ } | ||
// only Flow types were imported | ||
if (hasImportedType && importedSpecifiers.size === 0) return null; | ||
const p = remotePath(declaration.source.value); | ||
@@ -549,15 +564,17 @@ if (p == null) return null; | ||
if (n.type === 'TSExportAssignment') { | ||
const moduleDecl = ast.body.find(bodyNode => bodyNode.type === 'TSModuleDeclaration' && bodyNode.id.name === n.expression.name); | ||
if (moduleDecl && moduleDecl.body && moduleDecl.body.body) { | ||
moduleDecl.body.body.forEach(moduleBlockNode => { | ||
// Export-assignment exports all members in the namespace, explicitly exported or not. | ||
const exportedDecl = moduleBlockNode.type === 'ExportNamedDeclaration' ? moduleBlockNode.declaration : moduleBlockNode; | ||
const moduleDecls = ast.body.filter(bodyNode => bodyNode.type === 'TSModuleDeclaration' && bodyNode.id.name === n.expression.name); | ||
moduleDecls.forEach(moduleDecl => { | ||
if (moduleDecl && moduleDecl.body && moduleDecl.body.body) { | ||
moduleDecl.body.body.forEach(moduleBlockNode => { | ||
// Export-assignment exports all members in the namespace, explicitly exported or not. | ||
const exportedDecl = moduleBlockNode.type === 'ExportNamedDeclaration' ? moduleBlockNode.declaration : moduleBlockNode; | ||
if (exportedDecl.type === 'VariableDeclaration') { | ||
exportedDecl.declarations.forEach(decl => recursivePatternCapture(decl.id, id => m.namespace.set(id.name, captureDoc(source, docStyleParsers, decl, exportedDecl, moduleBlockNode)))); | ||
} else { | ||
m.namespace.set(exportedDecl.id.name, captureDoc(source, docStyleParsers, moduleBlockNode)); | ||
} | ||
}); | ||
} | ||
if (exportedDecl.type === 'VariableDeclaration') { | ||
exportedDecl.declarations.forEach(decl => recursivePatternCapture(decl.id, id => m.namespace.set(id.name, captureDoc(source, docStyleParsers, decl, exportedDecl, moduleBlockNode)))); | ||
} else { | ||
m.namespace.set(exportedDecl.id.name, captureDoc(source, docStyleParsers, moduleBlockNode)); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
@@ -639,2 +656,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBvcnRNYXAuanMiXSwibmFtZXMiOlsicmVjdXJzaXZlUGF0dGVybkNhcHR1cmUiLCJ1bmFtYmlndW91cyIsImxvZyIsImV4cG9ydENhY2hlIiwiTWFwIiwiRXhwb3J0TWFwIiwiY29uc3RydWN0b3IiLCJwYXRoIiwibmFtZXNwYWNlIiwicmVleHBvcnRzIiwiZGVwZW5kZW5jaWVzIiwiU2V0IiwiaW1wb3J0cyIsImVycm9ycyIsImhhc0RlZmF1bHQiLCJnZXQiLCJzaXplIiwiZm9yRWFjaCIsImRlcCIsImQiLCJoYXMiLCJuYW1lIiwiaW5uZXJNYXAiLCJoYXNEZWVwIiwiZm91bmQiLCJpbXBvcnRlZCIsImdldEltcG9ydCIsImxvY2FsIiwiZGVlcCIsInVuc2hpZnQiL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0IGlzbid0IF90aGF0XyBoYXJkLi4uIHJpZ2h0P1xuICovXG5mdW5jdGlvbiBtYWtlU291cmNlQ29kZSh0ZXh0LCBhc3QpIHtcbiAgaWYgKFNvdXJjZUNvZGUubGVuZ3RoID4gMSkge1xuICAgIC8vIEVTTGludCAzXG4gICAgcmV0dXJuIG5ldyBTb3VyY2VDb2RlKHRleHQsIGFzdClcbiAgfSBlbHNlIHtcbiAgICAvLyBFU0xpbnQgNCwgNVxuICAgIHJldHVybiBuZXcgU291cmNlQ29kZSh7IHRleHQsIGFzdCB9KVxuICB9XG59XG4iXX0= |
@@ -25,10 +25,3 @@ 'use strict'; | ||
// poor man's Array.find | ||
let defaultSpecifier; | ||
node.specifiers.some(n => { | ||
if (n.type === specifierType) { | ||
defaultSpecifier = n; | ||
return true; | ||
} | ||
}); | ||
const defaultSpecifier = node.specifiers.find(specifier => specifier.type === specifierType); | ||
@@ -42,3 +35,6 @@ if (!defaultSpecifier) return; | ||
} else if (imports.get('default') === undefined) { | ||
context.report(defaultSpecifier, 'No default export found in module.'); | ||
context.report({ | ||
node: defaultSpecifier, | ||
message: `No default export found in imported module "${node.source.value}".` | ||
}); | ||
} | ||
@@ -53,2 +49,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJjcmVhdGUiLCJjb250ZXh0IiwiY2hlY2tEZWZhdWx0Iiwic3BlY2lmaWVyVHlwZSIsIm5vZGUiLCJkZWZhdWx0U3BlY2lmaWVyIiwic3BlY2lmaWVycyIsInNvbWUiLCJuIiwiaW1wb3J0cyIsIkV4cG9ydHMiLCJnZXQiLCJzb3VyY2UiLCJ2YWx1ZSIsImVycm9ycyIsImxlbmd0aCIsInJlcG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i5gLFxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAnSW1wb3J0RGVjbGFyYXRpb24nOiBjaGVja0RlZmF1bHQuYmluZChudWxsLCAnSW1wb3J0RGVmYXVsdFNwZWNpZmllcicpLFxuICAgICAgJ0V4cG9ydE5hbWVkRGVjbGFyYXRpb24nOiBjaGVja0RlZmF1bHQuYmluZChudWxsLCAnRXhwb3J0RGVmYXVsdFNwZWNpZmllcicpLFxuICAgIH1cbiAgfSxcbn1cbiJdfQ== |
@@ -20,3 +20,3 @@ 'use strict'; | ||
/* | ||
Notes on Typescript namespaces aka TSModuleDeclaration: | ||
Notes on TypeScript namespaces aka TSModuleDeclaration: | ||
@@ -104,3 +104,3 @@ There are two forms: | ||
const parent = getParent(node); | ||
// support for old typescript versions | ||
// support for old TypeScript versions | ||
const isTypeVariableDecl = node.declaration.kind === 'type'; | ||
@@ -174,2 +174,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHBvcnQuanMiXSwibmFtZXMiOlsicm9vdFByb2dyYW0iLCJ0c1R5cGVQcmVmaXgiLCJpc1R5cGVzY3JpcHRGdW5jdGlvbk92ZXJsb2FkcyIsIm5vZGVzIiwidHlwZXMiLCJTZXQiLCJBcnJheSIsImZyb20iLCJub2RlIiwicGFyZW50IiwidHlwZSIsInNpemUiLCJoYXMiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJjcmVhdGUiLCJjb250ZXh0IiwibmFtZXNwYWNlIiwiTWFwIiwiYWRkTmFtZWQiLCJuYW1lIiwiaXNUeXBlIiwic2V0IiwibmFtZWQiLCJnZXQiLCJrZXkiLCJhZGQiLCJnZXRQYXJlbnQiLCJleHBvcnRlZCIsImRlY2xhcmF0aW9uIiwiaXNUeXBlVmFyaWFibGVEZWNsI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AgICAgICBjb25zdCBwYXJlbnQgPSBnZXRQYXJlbnQobm9kZSlcblxuICAgICAgICBsZXQgYW55ID0gZmFsc2VcbiAgICAgICAgcmVtb3RlRXhwb3J0cy5mb3JFYWNoKCh2LCBuYW1lKSA9PlxuICAgICAgICAgIG5hbWUgIT09ICdkZWZhdWx0JyAmJlxuICAgICAgICAgIChhbnkgPSB0cnVlKSAmJiAvLyBwb29yIG1hbidzIGZpbHRlclxuICAgICAgICAgIGFkZE5hbWVkKG5hbWUsIG5vZGUsIHBhcmVudCkpXG5cbiAgICAgICAgaWYgKCFhbnkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLnNvdXJjZSxcbiAgICAgICAgICAgIGBObyBuYW1lZCBleHBvcnRzIGZvdW5kIGluIG1vZHVsZSAnJHtub2RlLnNvdXJjZS52YWx1ZX0nLmApXG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZvciAobGV0IFssIG5hbWVkXSBvZiBuYW1lc3BhY2UpIHtcbiAgICAgICAgICBmb3IgKGxldCBbbmFtZSwgbm9kZXNdIG9mIG5hbWVkKSB7XG4gICAgICAgICAgICBpZiAobm9kZXMuc2l6ZSA8PSAxKSBjb250aW51ZVxuXG4gICAgICAgICAgICBpZiAoaXNUeXBlc2NyaXB0RnVuY3Rpb25PdmVybG9hZHMobm9kZXMpKSBjb250aW51ZVxuXG4gICAgICAgICAgICBmb3IgKGxldCBub2RlIG9mIG5vZGVzKSB7XG4gICAgICAgICAgICAgIGlmIChuYW1lID09PSAnZGVmYXVsdCcpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLCAnTXVsdGlwbGUgZGVmYXVsdCBleHBvcnRzLicpXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoXG4gICAgICAgICAgICAgICAgICBub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IHBhcmVudCkpXG5cbiAgICAgICAgaWYgKCFhbnkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLnNvdXJjZSxcbiAgICAgICAgICAgIGBObyBuYW1lZCBleHBvcnRzIGZvdW5kIGluIG1vZHVsZSAnJHtub2RlLnNvdXJjZS52YWx1ZX0nLmApXG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZvciAobGV0IFssIG5hbWVkXSBvZiBuYW1lc3BhY2UpIHtcbiAgICAgICAgICBmb3IgKGxldCBbbmFtZSwgbm9kZXNdIG9mIG5hbWVkKSB7XG4gICAgICAgICAgICBpZiAobm9kZXMuc2l6ZSA8PSAxKSBjb250aW51ZVxuXG4gICAgICAgICAgICBpZiAoaXNUeXBlc2NyaXB0RnVuY3Rpb25PdmVybG9hZHMobm9kZXMpKSBjb250aW51ZVxuXG4gICAgICAgICAgICBmb3IgKGxldCBub2RlIG9mIG5vZGVzKSB7XG4gICAgICAgICAgICAgIGlmIChuYW1lID09PSAnZGVmYXVsdCcpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLCAnTXVsdGlwbGUgZGVmYXVsdCBleHBvcnRzLicpXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoXG4gICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgYE11bHRpcGxlIGV4cG9ydHMgb2YgbmFtZSAnJHtuYW1lLnJlcGxhY2UodHNUeXBlUHJlZml4LCAnJyl9Jy5gXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgIH1cbiAgfSxcbn1cbiJdfQ== |
@@ -65,2 +65,7 @@ 'use strict'; | ||
if (result.defaultConfig === 'ignorePackages') { | ||
result.defaultConfig = 'always'; | ||
result.ignorePackages = true; | ||
} | ||
return result; | ||
@@ -171,2 +176,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHRlbnNpb25zLmpzIl0sIm5hbWVzIjpbImVudW1WYWx1ZXMiLCJlbnVtIiwicGF0dGVyblByb3BlcnRpZXMiLCJ0eXBlIiwicHJvcGVydGllcyIsImJ1aWxkUHJvcGVydGllcyIsImNvbnRleHQiLCJyZXN1bHQiLCJkZWZhdWx0Q29uZmlnIiwicGF0dGVybiIsImlnbm9yZVBhY2thZ2VzIiwib3B0aW9ucyIsImZvckVhY2giLCJvYmoiLCJ1bmRlZmluZWQiLCJPYmplY3QiLCJhc3NpZ24iLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJhbnlPZiIsIml0ZW1zIiwiYWRkaXRpb25hbEl0ZW1zIiwiY3JlYXRlIiwicHJvcHMiLCJnZXRNb2RpZmllciIsImV4dGVuc2lvbiIsImlzVXNlT2ZFeHRlbnNpb25SZXF1aXJlZCIsImlzUGFja2FnZU1haW4iLCJpc1VzZU9mRXh0ZW5zaW9uRm9yYmlkZGVuIiwiaXNSZXNvbHZhYmxlV2l0aG91dEV4dGVuc2lvbiIsImZpbGUiLCJwYXRoIiwiZXh0bmFtZSIsImZpbGVXaXRob3V0RXh0ZW5zaW9uIiwic2xpY2UiLCJsZW5ndGgiLCJyZXNvbHZlZEZpbGVXaXRob3V0RXh0ZW5zaW9uIiwiY2hlY2tGaWxlRXh0ZW5zaW9uIiwibm9kZSIsInNvdXJjZSIsImltcG9ydFBhdGgiLCJ2YWx1ZSIsInNldHRpbmdzIiwicmVzb2x2ZWRQYXRoIiwic3Vic3RyaW5nIiwiZW5kc1dpdGgiLCJleHRlbnNpb25SZXF1aXJlZCIsIm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M6IHtcbiAgICAgIHVybDogZG9jc1VybCgnZXh0ZW5zaW9ucycpLFxuICAgIH0sXG5cbiAgICBzY2hlbWE6IHtcbiAgICAgIGFueU9mOiBbXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbZW51bVZhbHVlc10sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgIGVudW1WYWx1ZXMsXG4gICAgICAgICAgICBwcm9wZXJ0aWVzLFxuICAgICAgICAgIF0sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtwcm9wZXJ0aWVzXSxcbiAgICAgICAgICBhZGRpdGlvbmFsSXRlbXM6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBpdGVtczogW3BhdHRlcm5Qcm9wZXJ0aWVzXSxcbiAgICAgICAgICBhZGRpdGlvbmFsSXRlbXM6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBpdGVtczogW1xuICAgICAgICAgICAgZW51bVZhbHVlcyxcbiAgICAgICAgICAgIHBhdHRlcm5Qcm9wZXJ0aWVzLFxuICAgICAgICAgIF0sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgfSxcbiAgfSxcblxuICBjcmVhdGU6IGZ1bmN0aW9uIChjb250ZXh0KSB7XG5cbiAgICBjb25zdCBwcm9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2lvbiwgaXNQYWNrYWdlTWFpbilcbiAgICAgICAgY29uc3QgZXh0ZW5zaW9uRm9yYmlkZGVuID0gaXNVc2VPZkV4dGVuc2lvbkZvcmJpZGRlbihleHRlbnNpb24pXG4gICAgICAgIGlmIChleHRlbnNpb25SZXF1aXJlZCAmJiAhZXh0ZW5zaW9uRm9yYmlkZGVuKSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZTogc291cmNlLFxuICAgICAgICAgICAgbWVzc2FnZTpcbiAgICAgICAgICAgICAgYE1pc3NpbmcgZmlsZSBleHRlbnNpb24gJHtleHRlbnNpb24gPyBgXCIke2V4dGVuc2lvbn1cIiBgIDogJyd9Zm9yIFwiJHtpbXBvcnRQYXRofVwiYCxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGV4dGVuc2lvbikge1xuICAgICAgICBpZiAoaXNVc2VPZkV4dGVuc2lvbkZvcmJpZGRlbihleHRlbnNpb24pICYmIGlzUmVzb2x2YWJsZVdpdGhvdXRFeHRlbnNpb24oaW1wb3J0UGF0aCkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlOiBzb3VyY2UsXG4gICAgICAgICAgICBtZXNzYWdlOiBgVW5leHBlY3RlZCB1c2Ugb2YgZmlsZSBleHRlbnNpb24gXCIke2V4dGVuc2lvbn1cIiBmb3IgXCIke2ltcG9ydFBhdGh9XCJgLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb246IGNoZWNrRmlsZUV4dGVuc2lvbixcbiAgICAgIEV4cG9ydE5hbWVkRGVjbGFyYXRpb246IGNoZWNrRmlsZUV4dGVuc2lvbixcbiAgICB9XG4gIH0sXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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gICByZXN1bHQuaWdub3JlUGFja2FnZXMgPSB0cnVlXG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdFxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdzdWdnZXN0aW9uJyxcbiAgICBkb2NzOiB7XG4gICAgICB1cmw6IGRvY3NVcmwoJ2V4dGVuc2lvbnMnKSxcbiAgICB9LFxuXG4gICAgc2NoZW1hOiB7XG4gICAgICBhbnlPZjogW1xuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBpdGVtczogW2VudW1WYWx1ZXNdLFxuICAgICAgICAgIGFkZGl0aW9uYWxJdGVtczogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbXG4gICAgICAgICAgICBlbnVtVmFsdWVzLFxuICAgICAgICAgICAgcHJvcGVydGllcyxcbiAgICAgICAgICBdLFxuICAgICAgICAgIGFkZGl0aW9uYWxJdGVtczogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbcHJvcGVydGllc10sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtwYXR0ZXJuUHJvcGVydGllc10sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgIGVudW1WYWx1ZXMsXG4gICAgICAgICAgICBwYXR0ZXJuUHJvcGVydGllcyxcbiAgICAgICAgICB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ICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uOiBjaGVja0ZpbGVFeHRlbnNpb24sXG4gICAgfVxuICB9LFxufVxuIl19 |
@@ -7,2 +7,10 @@ 'use strict'; | ||
var _object = require('object.values'); | ||
var _object2 = _interopRequireDefault(_object); | ||
var _arrayPrototype = require('array.prototype.flat'); | ||
var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -53,3 +61,4 @@ | ||
modules: new Set(), | ||
commonjs: new Set() | ||
commonjs: new Set(), | ||
sources: {} | ||
}; | ||
@@ -59,3 +68,9 @@ | ||
ExportNamedDeclaration(node) { | ||
nodes.modules.add(node); | ||
if (!node.source) { | ||
nodes.modules.add(node); | ||
} else if (Array.isArray(nodes.sources[node.source.value])) { | ||
nodes.sources[node.source.value].push(node); | ||
} else { | ||
nodes.sources[node.source.value] = [node]; | ||
} | ||
}, | ||
@@ -96,2 +111,10 @@ | ||
// Report multiple `aggregated exports` from the same module (ES2015 modules) | ||
(0, _arrayPrototype2.default)((0, _object2.default)(nodes.sources).filter(nodesWithSource => Array.isArray(nodesWithSource) && nodesWithSource.length > 1)).forEach(node => { | ||
context.report({ | ||
node, | ||
message: errors[node.type] | ||
}); | ||
}); | ||
// Report multiple `module.exports` assignments (CommonJS) | ||
@@ -114,2 +137,2 @@ if (nodes.commonjs.size > 1) { | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9ncm91cC1leHBvcnRzLmpzIl0sIm5hbWVzIjpbIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImVycm9ycyIsIkV4cG9ydE5hbWVkRGVjbGFyYXRpb24iLCJBc3NpZ25tZW50RXhwcmVzc2lvbiIsImFjY2Vzc29yQ2hhaW4iLCJub2RlIiwiY2hhaW4iLCJ1bnNoaWZ0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xuICAgICAgICBub2Rlcy5tb2R1bGVzLmZvckVhY2gobm9kZSA9PiB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGVycm9yc1tub2RlLnR5cGVdLFxuICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgICB9XG5cbiAgICAgIC8vIFJlcG9ydCBtdWx0aXBsZSBgbW9kdWxlLmV4cG9ydHNgIGFzc2lnbm1lbnRzIChDb21tb25KUylcbiAgICAgIGlmIChub2Rlcy5jb21tb25qcy5zaXplID4gMSkge1xuICAgICAgICBub2Rlcy5jb21tb25qcy5mb3JFYWNoKG5vZGUgPT4ge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiBlcnJvcnNbbm9kZS50eXBlXSxcbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH0sXG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIG1ldGEsXG4gIGNyZWF0ZSxcbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9ncm91cC1leHBvcnRzLmpzIl0sIm5hbWVzIjpbIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImVycm9ycyIsIkV4cG9ydE5hbWVkRGVjbGFyYXRpb24iLCJBc3NpZ25tZW50RXhwcmVzc2lvbiIsImFjY2Vzc29yQ2hhaW4iLCJub2RlIiwiY2hhaW4iLCJ1bnNoaWZ0IiwicHJvcGVydHkiLCJuYW1lIiwib2JqZWN0IiwiY3JlYXRlIiwiY29udGV4dCIsIm5vZGVzIiwibW9kdWxlcyIsIlNldCIsImNvbW1vbmpzIiwic291cmNlcyIsInNvdXJjZSIsImFkZCIsIkFycm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iAqIEBwYXJhbSAgICAge05vZGV9ICAgIG5vZGUgICAgQVNUIE5vZGUgKE1lbWJlckV4cHJlc3Npb24pXG4gKiBAcmV0dXJuICAgIHtBcnJheX0gICAgICAgICAgIEFycmF5IHdpdGggdGhlIHByb3BlcnR5IG5hbWVzIGluIHRoZSBjaGFpblxuICogQHByaXZhdGVcbiAqL1xuZnVuY3Rpb24gYWNjZXNzb3JDaGFpbihub2RlKSB7XG4gIGNvbnN0IGNoYWluID0gW11cblxuICBkbyB7XG4gICAgY2hhaW4udW5zaGlmdChub2RlLnByb3BlcnR5Lm5hbWUpXG5cbiAgICBpZiAobm9kZS5vYmplY3QudHlwZSA9PT0gJ0lkZW50aWZpZXInKSB7XG4gICAgICBjaGFpbi51bnNoaWZ0KG5vZGUub2JqZWN0Lm5hbWUpXG4gICAgICBicmVha1xuICAgIH1cblxuICAgIG5vZGUgPSBub2RlLm9iamVjdFxuICB9IHdoaWxlIChub2RlLnR5cGUgPT09ICdNZW1iZXJFeHByZXNzaW9uJylcblxuICByZXR1cm4gY2hhaW5cbn1cblxuZnVuY3Rpb24gY3JlYXRlKGNvbnRleHQpIHtcbiAgY29uc3Qgbm9kZXMgPSB7XG4gICAgbW9kdWxlczogbmV3IFNldCgpLFxuICAgIGNvbW1vbmpzOiBuZXcgU2V0KCksXG4gICAgc291cmNlczoge30sXG4gIH1cblxuICByZXR1cm4ge1xuICAgIEV4cG9ydE5hbWVkRGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgaWYgKCFub2RlLnNvdXJjZSkge1xuICAgICAgICBub2Rlcy5tb2R1bGVzLmFkZChub2RlKVxuICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KG5vZGVzLnNvdXJjZXNbbm9kZS5zb3VyY2UudmFsdWVdKSkge1xuICAgICAgICBub2Rlcy5zb3VyY2VzW25vZGUuc291cmNlLnZhbHVlXS5wdXNoKG5vZGUpXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBub2Rlcy5zb3Vy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G4gICAgfSxcbiAgfVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YSxcbiAgY3JlYXRlLFxufVxuIl19 |
@@ -32,2 +32,17 @@ 'use strict'; | ||
function allowConditionalRequire(node, options) { | ||
return options.allowConditionalRequire !== false; | ||
} | ||
function validateScope(scope) { | ||
return scope.variableScope.type === 'module'; | ||
} | ||
// https://github.com/estree/estree/blob/master/es5.md | ||
function isConditional(node) { | ||
if (node.type === 'IfStatement' || node.type === 'TryStatement' || node.type === 'LogicalExpression' || node.type === 'ConditionalExpression') return true; | ||
if (node.parent) return isConditional(node.parent); | ||
return false; | ||
} | ||
//------------------------------------------------------------------------------ | ||
@@ -42,3 +57,4 @@ // Rule Definition | ||
allowPrimitiveModules: { 'type': 'boolean' }, | ||
allowRequire: { 'type': 'boolean' } | ||
allowRequire: { 'type': 'boolean' }, | ||
allowConditionalRequire: { 'type': 'boolean' } | ||
}, | ||
@@ -90,4 +106,3 @@ additionalProperties: false | ||
'CallExpression': function (call) { | ||
if (context.getScope().type !== 'module') return; | ||
if (call.parent.type !== 'ExpressionStatement' && call.parent.type !== 'VariableDeclarator' && call.parent.type !== 'AssignmentExpression') return; | ||
if (!validateScope(context.getScope())) return; | ||
@@ -105,2 +120,4 @@ if (call.callee.type !== 'Identifier') return; | ||
if (allowConditionalRequire(call, options) && isConditional(call.parent)) return; | ||
// keeping it simple: all 1-string-arg `require` calls are reported | ||
@@ -115,2 +132,2 @@ context.report({ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1jb21tb25qcy5qcyJdLCJuYW1lcyI6WyJFWFBPUlRfTUVTU0FHRSIsIklNUE9SVF9NRVNTQUdFIiwibm9ybWFsaXplTGVnYWN5T3B0aW9ucyIsIm9wdGlvbnMiLCJpbmRleE9mIiwiYWxsb3dQcmltaXRpdmVNb2R1bGVzIiwiYWxs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gICAgZG9jczoge1xuICAgICAgdXJsOiBkb2NzVXJsKCduby1jb21tb25qcycpLFxuICAgIH0sXG5cbiAgICBzY2hlbWE6IHtcbiAgICAgIGFueU9mOiBbXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbc2NoZW1hU3RyaW5nXSxcbiAgICAgICAgICBhZGRpdGlvbmFsSXRlbXM6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBpdGVtczogW3NjaGVtYU9iamVjdF0sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgfSxcbiAgfSxcblxuICBjcmVhdGU6IGZ1bmN0aW9uIChjb250ZXh0KSB7XG4gICAgY29uc3Qgb3B0aW9ucyA9IG5vcm1hbGl6ZUxlZ2FjeU9wdGlvbnMoY29udGV4dC5vcHRpb25zKVxuXG4gICAgcmV0dXJuIHtcblxuICAgICAgJ01lbWJlckV4cHJlc3Npb24nOiBmdW5jdGlvbiAobm9kZSkge1xuXG4gICAgICAgIC8vIG1vZHVsZS5leHBvcnRzXG4gICAgICAgIGlmIChub2RlLm9iamVjdC5uYW1lID09PSAnbW9kdWxlJyAmJiBub2RlLnByb3BlcnR5Lm5hbWUgPT09ICdleHBvcnRzJykge1xuICAgICAgICAgIGlmIChhbGxvd1ByaW1pdGl2ZShub2RlLCBvcHRpb25zKSkgcmV0dXJuXG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlOiBFWFBPUlRfTUVTU0FHRSB9KVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gZXhwb3J0cy5cbiAgICAgICAgaWYgKG5vZGUub2JqZWN0Lm5hbWUgPT09ICdleHBvcnRzJykge1xuICAgICAgICAgIGNvbnN0IGlzSW5TY29wZSA9IGNvbn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WUsXG4gICAgICAgICAgbWVzc2FnZTogSU1QT1JUX01FU1NBR0UsXG4gICAgICAgIH0pXG4gICAgICB9LFxuICAgIH1cblxuICB9LFxufVxuIl19 |
@@ -236,6 +236,26 @@ 'use strict'; | ||
}, | ||
fixable: 'code' | ||
fixable: 'code', | ||
schema: [{ | ||
type: 'object', | ||
properties: { | ||
considerQueryString: { | ||
type: 'boolean' | ||
} | ||
}, | ||
additionalProperties: false | ||
}] | ||
}, | ||
create: function (context) { | ||
// Prepare the resolver from options. | ||
const considerQueryStringOption = context.options[0] && context.options[0]['considerQueryString']; | ||
const defaultResolver = sourcePath => (0, _resolve2.default)(sourcePath, context) || sourcePath; | ||
const resolver = considerQueryStringOption ? sourcePath => { | ||
const parts = sourcePath.match(/^([^?]*)\?(.*)$/); | ||
if (!parts) { | ||
return defaultResolver(sourcePath); | ||
} | ||
return defaultResolver(parts[1]) + '?' + parts[2]; | ||
} : defaultResolver; | ||
const imported = new Map(); | ||
@@ -246,3 +266,3 @@ const typesImported = new Map(); | ||
// resolved path will cover aliased duplicates | ||
const resolvedPath = (0, _resolve2.default)(n.source.value, context) || n.source.value; | ||
const resolvedPath = resolver(n.source.value); | ||
const importMap = n.importKind === 'type' ? typesImported : imported; | ||
@@ -264,2 +284,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kdXBsaWNhdGVzLmpzIl0sIm5hbWVzIjpbImNoZWNrSW1wb3J0cyIsImltcG9ydGVkIiwiY29udGV4dCIsImVudHJpZXMiLCJtb2R1bGUiLCJub2RlcyIsImxlbmd0aCIsIm1lc3NhZ2UiLCJmaXJzdCIsInJlc3QiLCJzb3VyY2VDb2RlIiwiZ2V0U291cmNlQ29kZSIsImZpeCIsImdldEZpeCIsInJlcG9ydCIsIm5vZGUiLCJzb3VyY2UiLCJnZXRDb21tZW50c0JlZm9yZSIsInVuZ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biAgICAgICdJbXBvcnREZWNsYXJhdGlvbic6IGZ1bmN0aW9uIChuKSB7XG4gICAgICAgIC8vIHJlc29sdmVkIHBhdGggd2lsbCBjb3ZlciBhbGlhc2VkIGR1cGxpY2F0ZXNcbiAgICAgICAgY29uc3QgcmVzb2x2ZWRQYXRoID0gcmVzb2x2ZShuLnNvdXJjZS52YWx1ZSwgY29udGV4dCkgfHwgbi5zb3VyY2UudmFsdWVcbiAgICAgICAgY29uc3QgaW1wb3J0TWFwID0gbi5pbXBvcnRLaW5kID09PSAndHlwZScgPyB0eXBlc0ltcG9ydGVkIDogaW1wb3J0ZWRcblxuICAgICAgICBpZiAoaW1wb3J0TWFwLmhhcyhyZXNvbHZlZFBhdGgpKSB7XG4gICAgICAgICAgaW1wb3J0TWFwLmdldChyZXNvbHZlZFBhdGgpLnB1c2gobilcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpbXBvcnRNYXAuc2V0KHJlc29sdmVkUGF0aCwgW25dKVxuICAgICAgICB9XG4gICAgICB9LFxuXG4gICAgICAnUHJvZ3JhbTpleGl0JzogZnVuY3Rpb24gKCkge1xuICAgICAgICBjaGVja0ltcG9ydHMoaW1wb3J0ZWQsIGNvbnRleHQpXG4gICAgICAgIGNoZWNrSW1wb3J0cyh0eXBlc0ltcG9ydGVkLCBjb250ZXh0KVxuICAgICAgfSxcbiAgICB9XG4gIH0sXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kdXBsaWNhdGVzLmpzIl0sIm5hbWVzIjpbImNoZWNrSW1wb3J0cyIsImltcG9ydGVkIiwiY29udGV4dCIsImVudHJpZXMiLCJtb2R1bGUiLCJub2RlcyIsImxlbmd0aCIsIm1lc3NhZ2UiLCJmaXJzdCIsInJlc3QiLCJzb3VyY2VDb2RlIiwiZ2V0U291cmNlQ29kZSIsImZpeCIsImdldEZp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d0eXBlJyA/IHR5cGVzSW1wb3J0ZWQgOiBpbXBvcnRlZFxuXG4gICAgICAgIGlmIChpbXBvcnRNYXAuaGFzKHJlc29sdmVkUGF0aCkpIHtcbiAgICAgICAgICBpbXBvcnRNYXAuZ2V0KHJlc29sdmVkUGF0aCkucHVzaChuKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGltcG9ydE1hcC5zZXQocmVzb2x2ZWRQYXRoLCBbbl0pXG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGNoZWNrSW1wb3J0cyhpbXBvcnRlZCwgY29udGV4dClcbiAgICAgICAgY2hlY2tJbXBvcnRzKHR5cGVzSW1wb3J0ZWQsIGNvbnRleHQpXG4gICAgICB9LFxuICAgIH1cbiAgfSxcbn1cbiJdfQ== |
@@ -43,2 +43,6 @@ 'use strict'; | ||
function arrayOrKeys(arrayOrObject) { | ||
return Array.isArray(arrayOrObject) ? arrayOrObject : Object.keys(arrayOrObject); | ||
} | ||
function extractDepFields(pkg) { | ||
@@ -49,3 +53,6 @@ return { | ||
optionalDependencies: pkg.optionalDependencies || {}, | ||
peerDependencies: pkg.peerDependencies || {} | ||
peerDependencies: pkg.peerDependencies || {}, | ||
// BundledDeps should be in the form of an array, but object notation is also supported by | ||
// `npm`, so we convert it to an array if it is an object | ||
bundledDependencies: arrayOrKeys(pkg.bundleDependencies || pkg.bundledDependencies || []) | ||
}; | ||
@@ -61,3 +68,4 @@ } | ||
optionalDependencies: {}, | ||
peerDependencies: {} | ||
peerDependencies: {}, | ||
bundledDependencies: [] | ||
}; | ||
@@ -84,3 +92,3 @@ | ||
if (![packageContent.dependencies, packageContent.devDependencies, packageContent.optionalDependencies, packageContent.peerDependencies].some(hasKeys)) { | ||
if (![packageContent.dependencies, packageContent.devDependencies, packageContent.optionalDependencies, packageContent.peerDependencies, packageContent.bundledDependencies].some(hasKeys)) { | ||
return null; | ||
@@ -141,4 +149,5 @@ } | ||
const isInPeerDeps = deps.peerDependencies[packageName] !== undefined; | ||
const isInBundledDeps = deps.bundledDependencies.indexOf(packageName) !== -1; | ||
if (isInDeps || depsOptions.allowDevDeps && isInDevDeps || depsOptions.allowPeerDeps && isInPeerDeps || depsOptions.allowOptDeps && isInOptDeps) { | ||
if (isInDeps || depsOptions.allowDevDeps && isInDevDeps || depsOptions.allowPeerDeps && isInPeerDeps || depsOptions.allowOptDeps && isInOptDeps || depsOptions.allowBundledDeps && isInBundledDeps) { | ||
return; | ||
@@ -182,2 +191,3 @@ } | ||
'peerDependencies': { 'type': ['boolean', 'array'] }, | ||
'bundledDependencies': { 'type': ['boolean', 'array'] }, | ||
'packageDir': { 'type': ['string', 'array'] } | ||
@@ -197,3 +207,4 @@ }, | ||
allowOptDeps: testConfig(options.optionalDependencies, filename) !== false, | ||
allowPeerDeps: testConfig(options.peerDependencies, filename) !== false | ||
allowPeerDeps: testConfig(options.peerDependencies, filename) !== false, | ||
allowBundledDeps: testConfig(options.bundledDependencies, filename) !== false | ||
@@ -205,2 +216,8 @@ // todo: use module visitor from module-utils core | ||
}, | ||
ExportNamedDeclaration: function (node) { | ||
reportIfMissing(context, deps, depsOptions, node, node.source.value); | ||
}, | ||
ExportAllDeclaration: function (node) { | ||
reportIfMissing(context, deps, depsOptions, node, node.source.value); | ||
}, | ||
CallExpression: function handleRequires(node) { | ||
@@ -214,2 +231,2 @@ if ((0, _staticRequire2.default)(node)) { | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llcy5qcyJdLCJuYW1lcyI6WyJoYXNLZXlzIiwib2JqIiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsImV4dHJhY3REZXBGaWVsZHMiLCJwa2ciLCJkZXBlbmRlbmNpZXMiLCJkZXZE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MgPSBbXVxuICB0cnkge1xuICAgIGNvbnN0IHBhY2thZ2VDb250ZW50ID0ge1xuICAgICAgZGVwZW5kZW5jaWVzOiB7fSxcbiAgICAgIGRldkRlcGVuZGVuY2llczoge30sXG4gICAgICBvcHRpb25hbERlcGVuZGVuY2llczoge30sXG4gICAgICBwZWVyRGVwZW5kZW5jaWVzOiB7fSxcbiAgICB9XG5cbiAgICBpZiAocGFja2FnZURpciAmJiBwYWNrYWdlRGlyLmxlbmd0aCA+IDApIHtcbiAgICAgIGlmICghQXJyYXkuaXNBcnJheShwYWNrYWdlRGlyKSkge1xuICAgICAgICBwYXRocyA9IFtwYXRoLnJlc29sdmUocGFja2FnZURpcildXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXRocyA9IHBhY2thZ2VEaXIubWFwKGRpciA9PiBwYXRoLnJlc29sdmUoZGlyKSlcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAocGF0aHMubGVuZ3RoID4gMCkge1xuICAgICAgLy8gdXNlIHJ1bGUgY29uZmlnIHRvIGZpbmQgcGFja2FnZS5qc29uXG4gICAgICBwYXRocy5mb3JFYWNoKGRpciA9PiB7XG4gICAgICAgIGNvbnN0IF9wYWNrYWdlQ29udGVudCA9IGV4dHJhY3REZXBGaWVsZHMoXG4gICAgICAgICAgSlNPTi5wYXJzZShmcy5yZWFkRmlsZVN5bmMocGF0aC5qb2luKGRpciwgJ3BhY2thZ2UuanNvbicpLCAndXRmOCcpKVxuICAgICAgICApXG4gICAgICAgIE9iamVjdC5rZXlzKHBhY2thZ2VDb250ZW50KS5mb3JFYWNoKGRlcHNLZXkgPT5cbiAgICAgICAgICBPYmplY3QuYXNzaWduKHBhY2thZ2VDb250ZW50W2RlcHNLZXldLCBfcGFja2FnZUNvbnRlbnRbZGVwc0tleV0pXG4gICAgICAgIClcbiAgICAgIH0pXG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIHVzZSBjbG9zZXN0IHBhY2thZ2UuanNvblxuICAgICAgT2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sbERlY2xhcmF0aW9uOiBmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICByZXBvcnRJZk1pc3NpbmcoY29udGV4dCwgZGVwcywgZGVwc09wdGlvbnMsIG5vZGUsIG5vZGUuc291cmNlLnZhbHVlKVxuICAgICAgfSxcbiAgICAgIENhbGxFeHByZXNzaW9uOiBmdW5jdGlvbiBoYW5kbGVSZXF1aXJlcyhub2RlKSB7XG4gICAgICAgIGlmIChpc1N0YXRpY1JlcXVpcmUobm9kZSkpIHtcbiAgICAgICAgICByZXBvcnRJZk1pc3NpbmcoY29udGV4dCwgZGVwcywgZGVwc09wdGlvbnMsIG5vZGUsIG5vZGUuYXJndW1lbnRzWzBdLnZhbHVlKVxuICAgICAgICB9XG4gICAgICB9LFxuICAgIH1cbiAgfSxcbn1cbiJdfQ== |
@@ -9,2 +9,7 @@ 'use strict'; | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } } /** | ||
* @fileoverview Rule to disallow namespace import | ||
* @author Radek Benkel | ||
*/ | ||
//------------------------------------------------------------------------------ | ||
@@ -20,3 +25,4 @@ // Rule Definition | ||
url: (0, _docsUrl2.default)('no-namespace') | ||
} | ||
}, | ||
fixable: 'code' | ||
}, | ||
@@ -27,10 +33,117 @@ | ||
'ImportNamespaceSpecifier': function (node) { | ||
context.report(node, `Unexpected namespace import.`); | ||
const scopeVariables = context.getScope().variables; | ||
const namespaceVariable = scopeVariables.find(variable => variable.defs[0].node === node); | ||
const namespaceReferences = namespaceVariable.references; | ||
const namespaceIdentifiers = namespaceReferences.map(reference => reference.identifier); | ||
const canFix = namespaceIdentifiers.length > 0 && !usesNamespaceAsObject(namespaceIdentifiers); | ||
context.report({ | ||
node, | ||
message: `Unexpected namespace import.`, | ||
fix: canFix && (fixer => { | ||
const scopeManager = context.getSourceCode().scopeManager; | ||
const fixes = []; | ||
// Pass 1: Collect variable names that are already in scope for each reference we want | ||
// to transform, so that we can be sure that we choose non-conflicting import names | ||
const importNameConflicts = {}; | ||
namespaceIdentifiers.forEach(identifier => { | ||
const parent = identifier.parent; | ||
if (parent && parent.type === 'MemberExpression') { | ||
const importName = getMemberPropertyName(parent); | ||
const localConflicts = getVariableNamesInScope(scopeManager, parent); | ||
if (!importNameConflicts[importName]) { | ||
importNameConflicts[importName] = localConflicts; | ||
} else { | ||
localConflicts.forEach(c => importNameConflicts[importName].add(c)); | ||
} | ||
} | ||
}); | ||
// Choose new names for each import | ||
const importNames = Object.keys(importNameConflicts); | ||
const importLocalNames = generateLocalNames(importNames, importNameConflicts, namespaceVariable.name); | ||
// Replace the ImportNamespaceSpecifier with a list of ImportSpecifiers | ||
const namedImportSpecifiers = importNames.map(importName => importName === importLocalNames[importName] ? importName : `${importName} as ${importLocalNames[importName]}`); | ||
fixes.push(fixer.replaceText(node, `{ ${namedImportSpecifiers.join(', ')} }`)); | ||
// Pass 2: Replace references to the namespace with references to the named imports | ||
namespaceIdentifiers.forEach(identifier => { | ||
const parent = identifier.parent; | ||
if (parent && parent.type === 'MemberExpression') { | ||
const importName = getMemberPropertyName(parent); | ||
fixes.push(fixer.replaceText(parent, importLocalNames[importName])); | ||
} | ||
}); | ||
return fixes; | ||
}) | ||
}); | ||
} | ||
}; | ||
} | ||
}; /** | ||
* @fileoverview Rule to disallow namespace import | ||
* @author Radek Benkel | ||
*/ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImNyZWF0ZSIsImNvbnRleHQiLCJub2RlIiwicmVwb3J0Il0sIm1hcHBpbmdzIjoiOztBQUtBOzs7Ozs7QUFFQTtBQUNBO0FBQ0E7OztBQUdBQSxPQ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JzogZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgY29udGV4dC5yZXBvcnQobm9kZSwgYFVuZXhwZWN0ZWQgbmFtZXNwYWNlIGltcG9ydC5gKVxuICAgICAgfSxcbiAgICB9XG4gIH0sXG59XG4iXX0= | ||
/** | ||
* @param {Identifier[]} namespaceIdentifiers | ||
* @returns {boolean} `true` if the namespace variable is more than just a glorified constant | ||
*/ | ||
};function usesNamespaceAsObject(namespaceIdentifiers) { | ||
return !namespaceIdentifiers.every(identifier => { | ||
const parent = identifier.parent; | ||
// `namespace.x` or `namespace['x']` | ||
return parent && parent.type === 'MemberExpression' && (parent.property.type === 'Identifier' || parent.property.type === 'Literal'); | ||
}); | ||
} | ||
/** | ||
* @param {MemberExpression} memberExpression | ||
* @returns {string} the name of the member in the object expression, e.g. the `x` in `namespace.x` | ||
*/ | ||
function getMemberPropertyName(memberExpression) { | ||
return memberExpression.property.type === 'Identifier' ? memberExpression.property.name : memberExpression.property.value; | ||
} | ||
/** | ||
* @param {ScopeManager} scopeManager | ||
* @param {ASTNode} node | ||
* @return {Set<string>} | ||
*/ | ||
function getVariableNamesInScope(scopeManager, node) { | ||
let currentNode = node; | ||
let scope = scopeManager.acquire(currentNode); | ||
while (scope == null) { | ||
currentNode = currentNode.parent; | ||
scope = scopeManager.acquire(currentNode, true); | ||
} | ||
return new Set([].concat(_toConsumableArray(scope.variables.map(variable => variable.name)), _toConsumableArray(scope.upper.variables.map(variable => variable.name)))); | ||
} | ||
/** | ||
* | ||
* @param {*} names | ||
* @param {*} nameConflicts | ||
* @param {*} namespaceName | ||
*/ | ||
function generateLocalNames(names, nameConflicts, namespaceName) { | ||
const localNames = {}; | ||
names.forEach(name => { | ||
let localName; | ||
if (!nameConflicts[name].has(name)) { | ||
localName = name; | ||
} else if (!nameConflicts[name].has(`${namespaceName}_${name}`)) { | ||
localName = `${namespaceName}_${name}`; | ||
} else { | ||
for (let i = 1; i < Infinity; i++) { | ||
if (!nameConflicts[name].has(`${namespaceName}_${name}_${i}`)) { | ||
localName = `${namespaceName}_${name}_${i}`; | ||
break; | ||
} | ||
} | ||
} | ||
localNames[name] = localName; | ||
}); | ||
return localNames; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImZpeGFibGUiLCJjcmVhdGUiLCJjb250ZXh0Iiwibm9kZSIsInNjb3BlVmFyaWFibGVzIiwiZ2V0U2NvcGUiLCJ2YXJpYWJsZXMiLCJuYW1lc3BhY2VWYXJpYWJsZSIsImZpbmQiLCJ2YXJpYWJsZSIsImRlZnMiLCJuYW1lc3BhY2VSZWZlcmVuY2VzIiwicmVmZXJlbmNlcyIsIm5hbWVzcGFjZUlkZW50aWZpZXJzIiwibWFwIiwicmVmZXJlbmNlIiwiaWRlbnRpZmllciIsImNhbkZpeCIsImxlbmd0aCIsInVzZXNOYW1lc3BhY2VBc09iamVjdCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJmaXgiLCJmaXhlciIsInNjb3BlTWFuYWdlciIsImdldFNvdXJjZUNvZGUiLCJmaXhlcyIsImltcG9ydE5hbWVDb25mbGljdHMiLCJmb3JFYWNoIiwicGFyZW50IiwiaW1wb3J0TmFtZSIsImdldE1lbWJlclByb3BlcnR5TmFtZSIsImxvY2FsQ29uZmxpY3RzIiwiZ2V0VmFyaWFibGVOYW1lc0luU2NvcGUiLCJjIiwiYWRkIiwiaW1wb3J0TmFtZXMiLCJPYmplY3QiLCJrZXlzIiwiaW1wb3J0TG9jYWxOYW1lcyIsImdlbmVyYXRlTG9jYWxOYW1lcyIsIm5hbWUiLCJuYW1lZEltcG9ydFNwZWNpZmllcnMiLCJwdXNoIiwicmVwbGFjZVRleHQiLCJqb2luIiwiZXZlcn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b25mbGljdHNcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgbG9jYWxDb25mbGljdHMuZm9yRWFjaCgoYykgPT4gaW1wb3J0TmFtZUNvbmZsaWN0c1tpbXBvcnROYW1lXS5hZGQoYykpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAvLyBDaG9vc2UgbmV3IG5hbWVzIGZvciBlYWNoIGltcG9ydFxuICAgICAgICAgICAgY29uc3QgaW1wb3J0TmFtZXMgPSBPYmplY3Qua2V5cyhpbXBvcnROYW1lQ29uZmxpY3RzKVxuICAgICAgICAgICAgY29uc3QgaW1wb3J0TG9jYWxOYW1lcyA9IGdlbmVyYXRlTG9jYWxOYW1lcyhcbiAgICAgICAgICAgICAgaW1wb3J0TmFtZXMsXG4gICAgICAgICAgICAgIGltcG9ydE5hbWVDb25mbGljdHMsXG4gICAgICAgICAgICAgIG5hbWVzcGFjZVZhcmlhYmxlLm5hbWVcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgLy8gUmVwbGFjZSB0aGUgSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyIHdpdGggYSBsaXN0IG9mIEltcG9ydFNwZWNpZmllcnNcbiAgICAgICAgICAgIGNvbnN0IG5hbWVkSW1wb3J0U3BlY2lmaWVycyA9IGltcG9ydE5hbWVzLm1hcCgoaW1wb3J0TmFtZSkgPT5cbiAgICAgICAgICAgICAgaW1wb3J0TmFtZSA9PT0gaW1wb3J0TG9jYWxOYW1lc1tpbXBvcnROYW1lXVxuICAgICAgICAgICAgICAgID8gaW1wb3J0TmFtZVxuICAgICAgICAgICAgICAgIDogYCR7aW1wb3J0TmFtZX0gYXMgJHtpbXBvcnRMb2NhbE5hbWVzW2ltcG9ydE5hbWVdfWBcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGZpeGVzLnB1c2goZml4ZXIucmVwbGFjZVRleHQobm9kZS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FtZXNwYWNlTmFtZX1fJHtuYW1lfV8ke2l9YCkpIHtcbiAgICAgICAgICBsb2NhbE5hbWUgPSBgJHtuYW1lc3BhY2VOYW1lfV8ke25hbWV9XyR7aX1gXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICBsb2NhbE5hbWVzW25hbWVdID0gbG9jYWxOYW1lXG4gIH0pXG4gIHJldHVybiBsb2NhbE5hbWVzXG59XG4iXX0= |
@@ -21,2 +21,3 @@ 'use strict'; | ||
let hasStarExport = false; | ||
let hasTypeExport = false; | ||
let namedExportNode = null; | ||
@@ -30,2 +31,4 @@ | ||
}); | ||
} else if (identifierOrPattern.type === 'ArrayPattern') { | ||
identifierOrPattern.elements.forEach(captureDeclaration); | ||
} else { | ||
@@ -55,5 +58,2 @@ // assume it's a single standard identifier | ||
// don't warn on single type aliases, declarations, or interfaces | ||
if (node.exportKind === 'type') return; | ||
const type = node.declaration.type; | ||
@@ -63,2 +63,4 @@ | ||
if (type === 'TSTypeAliasDeclaration' || type === 'TypeAlias' || type === 'TSInterfaceDeclaration' || type === 'InterfaceDeclaration') { | ||
specifierExportCount++; | ||
hasTypeExport = true; | ||
return; | ||
@@ -88,3 +90,3 @@ } | ||
'Program:exit': function () { | ||
if (specifierExportCount === 1 && !hasDefaultExport && !hasStarExport) { | ||
if (specifierExportCount === 1 && !hasDefaultExport && !hasStarExport && !hasTypeExport) { | ||
context.report(namedExportNode, 'Prefer default export.'); | ||
@@ -96,2 +98,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9wcmVmZXItZGVmYXVsdC1leHBvcnQuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImNyZWF0ZSIsImNvbnRleHQiLCJzcGVjaWZpZXJFeH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AgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAvLyBjYXB0dXJlcyAnZXhwb3J0IGZ1bmN0aW9uIGZvbygpIHt9JyBzeW50YXhcbiAgICAgICAgICBzcGVjaWZpZXJFeHBvcnRDb3VudCsrXG4gICAgICAgIH1cblxuICAgICAgICBuYW1lZEV4cG9ydE5vZGUgPSBub2RlXG4gICAgICB9LFxuXG4gICAgICAnRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uJzogZnVuY3Rpb24oKSB7XG4gICAgICAgIGhhc0RlZmF1bHRFeHBvcnQgPSB0cnVlXG4gICAgICB9LFxuXG4gICAgICAnRXhwb3J0QWxsRGVjbGFyYXRpb24nOiBmdW5jdGlvbigpIHtcbiAgICAgICAgaGFzU3RhckV4cG9ydCA9IHRydWVcbiAgICAgIH0sXG5cbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHNwZWNpZmllckV4cG9ydENvdW50ID09PSAxICYmICFoYXNEZWZhdWx0RXhwb3J0ICYmICFoYXNTdGFyRXhwb3J0ICYmICFoYXNUeXBlRXhwb3J0KSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQobmFtZWRFeHBvcnROb2RlLCAnUHJlZmVyIGRlZmF1bHQgZXhwb3J0LicpXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfVxuICB9LFxufVxuIl19 |
@@ -1,2 +0,2 @@ | ||
"use strict" | ||
'use strict' | ||
@@ -23,3 +23,3 @@ const crypto = require('crypto') | ||
if (!options.filePath) { | ||
throw new Error("no file path provided!") | ||
throw new Error('no file path provided!') | ||
} | ||
@@ -26,0 +26,0 @@ |
{ | ||
"name": "eslint-plugin-import", | ||
"version": "2.18.2", | ||
"version": "2.19.0", | ||
"description": "Import with sanity.", | ||
@@ -22,3 +22,3 @@ "engines": { | ||
"pretest": "linklocal", | ||
"posttest": "eslint ./src", | ||
"posttest": "eslint .", | ||
"mocha": "cross-env BABEL_ENV=test NODE_PATH=./src nyc -s mocha -R dot --recursive -t 5s", | ||
@@ -59,5 +59,5 @@ "test": "npm run mocha tests/src", | ||
"babel-register": "^6.26.0", | ||
"babylon": "^6.15.0", | ||
"babylon": "^6.18.0", | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.2", | ||
"coveralls": "^3.0.6", | ||
"cross-env": "^4.0.0", | ||
@@ -75,4 +75,4 @@ "eslint": "2.x - 6.x", | ||
"redux": "^3.7.2", | ||
"rimraf": "^2.6.3", | ||
"semver": "^6.0.0", | ||
"rimraf": "^2.7.1", | ||
"semver": "^6.3.0", | ||
"sinon": "^2.4.1", | ||
@@ -87,2 +87,3 @@ "typescript": "~3.2.2", | ||
"array-includes": "^3.0.3", | ||
"array.prototype.flat": "^1.2.1", | ||
"contains-path": "^0.1.0", | ||
@@ -92,3 +93,3 @@ "debug": "^2.6.9", | ||
"eslint-import-resolver-node": "^0.3.2", | ||
"eslint-module-utils": "^2.4.0", | ||
"eslint-module-utils": "^2.4.1", | ||
"has": "^1.0.3", | ||
@@ -98,3 +99,3 @@ "minimatch": "^3.0.4", | ||
"read-pkg-up": "^2.0.0", | ||
"resolve": "^1.11.0" | ||
"resolve": "^1.12.0" | ||
}, | ||
@@ -101,0 +102,0 @@ "nyc": { |
@@ -84,3 +84,3 @@ # eslint-plugin-import | ||
* Report repeated import of the same module in multiple places ([`no-duplicates`]) | ||
* Report namespace imports ([`no-namespace`]) | ||
* Forbid namespace (a.k.a. "wildcard" `*`) imports ([`no-namespace`]) | ||
* Ensure consistent use of file extension within the import path ([`extensions`]) | ||
@@ -116,2 +116,6 @@ * Enforce a convention in module import order ([`order`]) | ||
## Support | ||
[Get supported eslint-plugin-import with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-eslint-plugin-import?utm_source=npm-eslint-plugin-import&utm_medium=referral&utm_campaign=readme) | ||
## Installation | ||
@@ -153,3 +157,3 @@ | ||
# Typescript | ||
# TypeScript | ||
@@ -404,3 +408,17 @@ You may use the following shortcut or assemble your own config using the granular settings described below. | ||
#### `import/internal-regex` | ||
A regex for packages should be treated as internal. Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other. | ||
By default, any package referenced from [`import/external-module-folders`](#importexternal-module-folders) will be considered as "external", including packages in a monorepo like yarn workspace or lerna emvironentment. If you want to mark these packages as "internal" this will be useful. | ||
For example, if you pacakges in a monorepo are all in `@scope`, you can configure `import/internal-regex` like this | ||
```yaml | ||
# .eslintrc.yml | ||
settings: | ||
import/internal-regex: ^@scope/ | ||
``` | ||
## SublimeLinter-eslint | ||
@@ -407,0 +425,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
732149
63
5173
494
13
+ Addedarray.prototype.flat@^1.2.1
+ Addedarray.prototype.flat@1.3.2(transitive)
+ Addedes-shim-unscopables@1.0.2(transitive)
Updatedeslint-module-utils@^2.4.1
Updatedresolve@^1.12.0