diff --git a/.changeset/shiny-weeks-do.md b/.changeset/shiny-weeks-do.md new file mode 100644 index 000000000..ba64079f9 --- /dev/null +++ b/.changeset/shiny-weeks-do.md @@ -0,0 +1,5 @@ +--- +"@rnx-kit/eslint-plugin": patch +--- + +Handle case where exported specifier is a string literal diff --git a/packages/config/src/bundleConfig.ts b/packages/config/src/bundleConfig.ts index 354099882..ac7c92ce1 100644 --- a/packages/config/src/bundleConfig.ts +++ b/packages/config/src/bundleConfig.ts @@ -156,5 +156,5 @@ export type BundleConfig = BundleParameters & { * Platform-specific overrides for bundling. Any parameter not listed in an override gets * its value from the shared bundle configuration, or falls back to defaults. */ - platforms?: { [K in AllPlatforms]?: BundleParameters }; + platforms?: Partial>; }; diff --git a/packages/eslint-plugin/src/rules/no-export-all.js b/packages/eslint-plugin/src/rules/no-export-all.js index 6c246d25d..386311b44 100644 --- a/packages/eslint-plugin/src/rules/no-export-all.js +++ b/packages/eslint-plugin/src/rules/no-export-all.js @@ -331,7 +331,11 @@ function extractExports(context, moduleId, depth) { } else { const set = node.exportKind === "type" ? types : exports; node.specifiers.forEach((spec) => { - const name = spec.exported.name; + const exported = spec.exported; + const name = + exported.type === "Identifier" + ? exported.name + : exported.value; if (name !== "default") { set.add(name); } diff --git a/yarn.lock b/yarn.lock index a08c904b7..5fb5325d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5154,15 +5154,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.8.1" +"@typescript-eslint/eslint-plugin@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.19.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/type-utils": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.19.0" + "@typescript-eslint/type-utils": "npm:8.19.0" + "@typescript-eslint/utils": "npm:8.19.0" + "@typescript-eslint/visitor-keys": "npm:8.19.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -5170,103 +5170,99 @@ __metadata: peerDependencies: "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/020a0a482202b34c6665a56ec5902e38ae1870b2600ec1b2092de352b23099dde553781ee8323974f63962ebe164a6304f0019e937afb5cf7854b0e0163ad1ca + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/ceaa5063b68684b5608950b5e69f0caf1eadfc356cba82625240d6aae55f769faff599c38d35252dcb77a40d92e6fbf6d6264bc0c577d5c549da25061c3bd796 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.8.1, @typescript-eslint/parser@npm:^8.0.0": - version: 8.8.1 - resolution: "@typescript-eslint/parser@npm:8.8.1" +"@typescript-eslint/parser@npm:8.19.0, @typescript-eslint/parser@npm:^8.0.0": + version: 8.19.0 + resolution: "@typescript-eslint/parser@npm:8.19.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.19.0" + "@typescript-eslint/types": "npm:8.19.0" + "@typescript-eslint/typescript-estree": "npm:8.19.0" + "@typescript-eslint/visitor-keys": "npm:8.19.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/2afd147ccec6754316d6837d6108a5d822eb6071e1a7355073288c232530bc3e49901d3f08755ce02d497110c531f3b3658eb46d0ff875a69d4f360b5f938cb4 + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/064b0997963060490fc3f92c90cebc7c694f47a7657f7882ce9eb314786e0cf3e917bfccfad614d23038439d84e69a978bdc7054515b23201001dd427e524e64 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/scope-manager@npm:8.8.1" +"@typescript-eslint/scope-manager@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/scope-manager@npm:8.19.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - checksum: 10c0/6f697baf087aedc3f0f228ff964fd108a9dd33fe4e5cc6c914be6367c324cee55629e099832668042bedfec8cdc72c6ef2ca960ee26966dbcc75753059a1352f + "@typescript-eslint/types": "npm:8.19.0" + "@typescript-eslint/visitor-keys": "npm:8.19.0" + checksum: 10c0/5052863d00db7ae939de27e91dc6c92df3c37a877e1ff44015ae9aa754d419b44d97d98b25fbb30a80dc58cf92606dad599e27f32b86d20c13b77ac12b4f2abc languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/type-utils@npm:8.8.1" +"@typescript-eslint/type-utils@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/type-utils@npm:8.19.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" + "@typescript-eslint/typescript-estree": "npm:8.19.0" + "@typescript-eslint/utils": "npm:8.19.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/6edfc2b9fca5233dd922141f080377b677db1093ec3e702a3ab52d58f77b91c0fb69479d4d42f125536b8fc0ffa85c07c7de2f17cc4c6fa1df1226ec01e5608c + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/5a460b4d26fd68ded3567390cbac310500e94e9c69583fda3fb9930877663719e6831699bb6d85de6b940bcb7951a51ab1ef67c5fea8b76a13ea3a3783bbae28 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.8.1, @typescript-eslint/types@npm:^8.0.0": - version: 8.8.1 - resolution: "@typescript-eslint/types@npm:8.8.1" - checksum: 10c0/4b44857332a0b1bfafbeccb8be157f8266d9e226ac723f6af1272b9b670b49444423ddac733655163eb3b90e8c88393a68ab2d7f326f5775371eaf4b9ca31d7b +"@typescript-eslint/types@npm:8.19.0, @typescript-eslint/types@npm:^8.0.0": + version: 8.19.0 + resolution: "@typescript-eslint/types@npm:8.19.0" + checksum: 10c0/0062e7dce5f374e293c97f1f50fe450187f6b0eaf4971c818e18ef2f6baf4e9aa4e8605fba8d8fc464a504ee1130527b71ecb39d31687c31825942b9f569d902 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.8.1" +"@typescript-eslint/typescript-estree@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.19.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/types": "npm:8.19.0" + "@typescript-eslint/visitor-keys": "npm:8.19.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/e3b9bc1e925c07833237044271cdc9bd8bdba3e2143dcfc5bf3bf481c89731b666a6fad25333a4b1980ac2f4c6f5e6e42c71206f73f3704e319f6b3b67463a6a + peerDependencies: + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/ff47004588e8ff585af740b3e0bda07dc52310dbfeb2317eb4a723935740cf0c1953fc9ba57f14cf192bcfe373c46be833ba29d3303df8b501181bb852c7b822 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/utils@npm:8.8.1" +"@typescript-eslint/utils@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/utils@npm:8.19.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.19.0" + "@typescript-eslint/types": "npm:8.19.0" + "@typescript-eslint/typescript-estree": "npm:8.19.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/954a2e85ae56a3ebefb6e41fb33c59ffa886963860536e9729a35ecea55eefdc58858c7aa126048c4a61f4fd9997b4f7601e7884ed2b3e4e7a46c9e4617a9f29 + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/7731f7fb66d54491769ca68fd04728138ceb6b785778ad491f8e9b2147802fa0ff480e520f6ea5fb73c8484d13a2ed3e35d44635f5bf4cfbdb04c313154097a9 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.8.1" +"@typescript-eslint/visitor-keys@npm:8.19.0": + version: 8.19.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.19.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/6f917090b61277bd443aa851c532c4a9cc91ad57aedf185c5dff0c530f158cce84ef815833bd8deffa87f0bbf7a9f1abd1e02e30af2463c4e7f27c0c08f59080 + "@typescript-eslint/types": "npm:8.19.0" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10c0/a293def05018bb2259506e23cd8f14349f4386d0e51231893fbddf96ef73c219d5f9fe17b82e3c104f5c23956dbd9b87af3cff5e84b887af243139a3b4bbbe0d languageName: node linkType: hard @@ -7540,17 +7536,17 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 languageName: node linkType: hard -"eslint-visitor-keys@npm:^4.1.0": - version: 4.1.0 - resolution: "eslint-visitor-keys@npm:4.1.0" - checksum: 10c0/5483ef114c93a136aa234140d7aa3bd259488dae866d35cb0d0b52e6a158f614760a57256ac8d549acc590a87042cb40f6951815caa821e55dc4fd6ef4c722eb +"eslint-visitor-keys@npm:^4.1.0, eslint-visitor-keys@npm:^4.2.0": + version: 4.2.0 + resolution: "eslint-visitor-keys@npm:4.2.0" + checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 languageName: node linkType: hard @@ -13963,16 +13959,16 @@ __metadata: linkType: hard "typescript-eslint@npm:^8.0.0": - version: 8.8.1 - resolution: "typescript-eslint@npm:8.8.1" + version: 8.19.0 + resolution: "typescript-eslint@npm:8.19.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.8.1" - "@typescript-eslint/parser": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/d6793697fce239ef8838ced6e1e59940c30579c8f62c49bc605fdeda9f3f7a5c24bfddd997b142f8c411859dc0b9985ecdae569814dd4f8e6775e1899d55e9cc + "@typescript-eslint/eslint-plugin": "npm:8.19.0" + "@typescript-eslint/parser": "npm:8.19.0" + "@typescript-eslint/utils": "npm:8.19.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.8.0" + checksum: 10c0/87da630f50025b3ae943eac521809fef41ba4013b5c4206865c115b728684caa7b4c36ee561dd95af7eb4dc18ec1265b165b49d2db54e3d8fba0152bcb6c82f8 languageName: node linkType: hard