Skip to content

Commit f73cb88

Browse files
committed
refactor(sdk-node): fix eslint warning
``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-sdk-node/src/index.ts 20:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 21:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 22:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 23:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 24:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 25:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 26:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax 27:1 warning Using 'ExportAllDeclaration' is not allowed no-restricted-syntax ``` This feels a bit different than the other ones, as this is a meta- package, and these are wildcard exports to re-export all the public exports from the upstream packages into individual _namesapces_. There is no risk of accidentally exporting something that wasn't meant to be public, and it would be a huge pain to enumerate things from each of the upstream packages and keep things in-sync. Ref open-telemetry#5365
1 parent 3c040c4 commit f73cb88

File tree

1 file changed

+6
-3
lines changed
  • experimental/packages/opentelemetry-sdk-node/src

1 file changed

+6
-3
lines changed

experimental/packages/opentelemetry-sdk-node/src/index.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
18-
* TODO: Replace wildcard export with named exports before next major version
19-
*/
17+
// These exist to re-export *all* items from the individual packages as
18+
// individual namespaces, so `export *` is appropriate here.
19+
20+
/* eslint-disable no-restricted-syntax */
2021
export * as api from '@opentelemetry/api';
2122
export * as contextBase from '@opentelemetry/api';
2223
export * as core from '@opentelemetry/core';
@@ -25,5 +26,7 @@ export * as metrics from '@opentelemetry/sdk-metrics';
2526
export * as node from '@opentelemetry/sdk-trace-node';
2627
export * as resources from '@opentelemetry/resources';
2728
export * as tracing from '@opentelemetry/sdk-trace-base';
29+
/* eslint-enable no-restricted-syntax */
30+
2831
export { LoggerProviderConfig, MeterProviderConfig, NodeSDK } from './sdk';
2932
export { NodeSDKConfiguration } from './types';

0 commit comments

Comments
 (0)