Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: apply eslint rule semi #2710

Merged
merged 3 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup!
  • Loading branch information
legendecas committed Jan 10, 2022
commit 61581ca0759acefd8d431a8d4b125c4d3b9de1dc
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
"project": "./tsconfig.json"
},
rules: {
"semi": "error",
"no-trailing-spaces": "error",
"eol-last": "error",
"quotes": [2, "single", { "avoidEscape": true }],
Expand Down Expand Up @@ -43,6 +42,7 @@ module.exports = {
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/semi": "error",
"arrow-parens": ["error", "as-needed"],
"node/no-deprecated-api": ["warn"],
"header/header": [2, "block", [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export type Measurement = {
// TODO use common attributes
attributes: Attributes
context?: api.Context;
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { MetricCollector } from './state/MetricCollector';

export type MeterProviderOptions = {
resource?: Resource;
}
};

export class MeterProvider {
private _sharedState: MeterProviderSharedState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ export type Exemplar = {
// trace_id may be missing if the measurement is not recorded inside a trace
// or if the trace is not sampled.
traceId?: string;
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { callWithTimeout } from '../utils';

export type ReaderOptions = {
timeoutMillis?: number
}
};

export type ReaderCollectionOptions = ReaderOptions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type PeriodicExportingMetricReaderOptions = {
exporter: MetricExporter
exportIntervalMillis?: number,
exportTimeoutMillis?: number
}
};

/**
* {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { defaultInstrumentationLibrary, defaultResource, assertMetricData, asser
import { TestMetricReader } from '../export/TestMetricReader';

class TestMetricExporter extends MetricExporter {
metricDataList: MetricData[] = []
metricDataList: MetricData[] = [];
async export(batch: MetricData[]): Promise<void> {
this.metricDataList.push(...batch);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const defaultInstrumentationLibrary: InstrumentationLibrary = {

export const commonValues: number[] = [1, -1, 1.0, Infinity, -Infinity, NaN];
export const commonAttributes: Attributes[] = [{}, {1: '1'}, {a: '2'}, new (class Foo{
a = '1'
a = '1';
})];

export const sleep = (time: number) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { SpanExporter } from '../../../export/SpanExporter';
import { BatchSpanProcessorBrowserConfig } from '../../../types';

export class BatchSpanProcessor extends BatchSpanProcessorBase<BatchSpanProcessorBrowserConfig> {
private _visibilityChangeListener?: () => void
private _pageHideListener?: () => void
private _visibilityChangeListener?: () => void;
private _pageHideListener?: () => void;

constructor(_exporter: SpanExporter, config?: BatchSpanProcessorBrowserConfig) {
super(_exporter, config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ export const CloudProviderValues = {
/** Google Cloud Platform. */
GCP: 'gcp',
} as const;
export type CloudProviderValues = typeof CloudProviderValues[keyof typeof CloudProviderValues]
export type CloudProviderValues = typeof CloudProviderValues[keyof typeof CloudProviderValues];



Expand Down Expand Up @@ -528,7 +528,7 @@ export const CloudPlatformValues = {
/** Google Cloud App Engine (GAE). */
GCP_APP_ENGINE: 'gcp_app_engine',
} as const;
export type CloudPlatformValues = typeof CloudPlatformValues[keyof typeof CloudPlatformValues]
export type CloudPlatformValues = typeof CloudPlatformValues[keyof typeof CloudPlatformValues];



Expand All @@ -539,7 +539,7 @@ export const AwsEcsLaunchtypeValues = {
/** fargate. */
FARGATE: 'fargate',
} as const;
export type AwsEcsLaunchtypeValues = typeof AwsEcsLaunchtypeValues[keyof typeof AwsEcsLaunchtypeValues]
export type AwsEcsLaunchtypeValues = typeof AwsEcsLaunchtypeValues[keyof typeof AwsEcsLaunchtypeValues];



Expand All @@ -560,7 +560,7 @@ export const HostArchValues = {
/** 32-bit x86. */
X86: 'x86',
} as const;
export type HostArchValues = typeof HostArchValues[keyof typeof HostArchValues]
export type HostArchValues = typeof HostArchValues[keyof typeof HostArchValues];



Expand Down Expand Up @@ -589,7 +589,7 @@ export const OsTypeValues = {
/** IBM z/OS. */
Z_OS: 'z_os',
} as const;
export type OsTypeValues = typeof OsTypeValues[keyof typeof OsTypeValues]
export type OsTypeValues = typeof OsTypeValues[keyof typeof OsTypeValues];



Expand All @@ -616,5 +616,5 @@ export const TelemetrySdkLanguageValues = {
/** webjs. */
WEBJS: 'webjs',
} as const;
export type TelemetrySdkLanguageValues = typeof TelemetrySdkLanguageValues[keyof typeof TelemetrySdkLanguageValues]
export type TelemetrySdkLanguageValues = typeof TelemetrySdkLanguageValues[keyof typeof TelemetrySdkLanguageValues];

Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export const DbSystemValues = {
/** CockroachDB. */
COCKROACHDB: 'cockroachdb',
} as const;
export type DbSystemValues = typeof DbSystemValues[keyof typeof DbSystemValues]
export type DbSystemValues = typeof DbSystemValues[keyof typeof DbSystemValues];



Expand Down Expand Up @@ -849,7 +849,7 @@ export const DbCassandraConsistencyLevelValues = {
/** local_serial. */
LOCAL_SERIAL: 'local_serial',
} as const;
export type DbCassandraConsistencyLevelValues = typeof DbCassandraConsistencyLevelValues[keyof typeof DbCassandraConsistencyLevelValues]
export type DbCassandraConsistencyLevelValues = typeof DbCassandraConsistencyLevelValues[keyof typeof DbCassandraConsistencyLevelValues];



Expand All @@ -866,7 +866,7 @@ export const FaasTriggerValues = {
/** If none of the others apply. */
OTHER: 'other',
} as const;
export type FaasTriggerValues = typeof FaasTriggerValues[keyof typeof FaasTriggerValues]
export type FaasTriggerValues = typeof FaasTriggerValues[keyof typeof FaasTriggerValues];



Expand All @@ -879,7 +879,7 @@ export const FaasDocumentOperationValues = {
/** When an object is deleted. */
DELETE: 'delete',
} as const;
export type FaasDocumentOperationValues = typeof FaasDocumentOperationValues[keyof typeof FaasDocumentOperationValues]
export type FaasDocumentOperationValues = typeof FaasDocumentOperationValues[keyof typeof FaasDocumentOperationValues];



Expand All @@ -894,7 +894,7 @@ export const FaasInvokedProviderValues = {
/** Google Cloud Platform. */
GCP: 'gcp',
} as const;
export type FaasInvokedProviderValues = typeof FaasInvokedProviderValues[keyof typeof FaasInvokedProviderValues]
export type FaasInvokedProviderValues = typeof FaasInvokedProviderValues[keyof typeof FaasInvokedProviderValues];



Expand All @@ -915,7 +915,7 @@ export const NetTransportValues = {
/** Something else (non IP-based). */
OTHER: 'other',
} as const;
export type NetTransportValues = typeof NetTransportValues[keyof typeof NetTransportValues]
export type NetTransportValues = typeof NetTransportValues[keyof typeof NetTransportValues];



Expand All @@ -932,7 +932,7 @@ export const NetHostConnectionTypeValues = {
/** unknown. */
UNKNOWN: 'unknown',
} as const;
export type NetHostConnectionTypeValues = typeof NetHostConnectionTypeValues[keyof typeof NetHostConnectionTypeValues]
export type NetHostConnectionTypeValues = typeof NetHostConnectionTypeValues[keyof typeof NetHostConnectionTypeValues];



Expand Down Expand Up @@ -981,7 +981,7 @@ export const NetHostConnectionSubtypeValues = {
/** LTE CA. */
LTE_CA: 'lte_ca',
} as const;
export type NetHostConnectionSubtypeValues = typeof NetHostConnectionSubtypeValues[keyof typeof NetHostConnectionSubtypeValues]
export type NetHostConnectionSubtypeValues = typeof NetHostConnectionSubtypeValues[keyof typeof NetHostConnectionSubtypeValues];



Expand All @@ -998,7 +998,7 @@ export const HttpFlavorValues = {
/** QUIC protocol. */
QUIC: 'QUIC',
} as const;
export type HttpFlavorValues = typeof HttpFlavorValues[keyof typeof HttpFlavorValues]
export type HttpFlavorValues = typeof HttpFlavorValues[keyof typeof HttpFlavorValues];



Expand All @@ -1009,7 +1009,7 @@ export const MessagingDestinationKindValues = {
/** A message sent to a topic. */
TOPIC: 'topic',
} as const;
export type MessagingDestinationKindValues = typeof MessagingDestinationKindValues[keyof typeof MessagingDestinationKindValues]
export type MessagingDestinationKindValues = typeof MessagingDestinationKindValues[keyof typeof MessagingDestinationKindValues];



Expand All @@ -1020,7 +1020,7 @@ export const MessagingOperationValues = {
/** process. */
PROCESS: 'process',
} as const;
export type MessagingOperationValues = typeof MessagingOperationValues[keyof typeof MessagingOperationValues]
export type MessagingOperationValues = typeof MessagingOperationValues[keyof typeof MessagingOperationValues];



Expand Down Expand Up @@ -1061,7 +1061,7 @@ export const RpcGrpcStatusCodeValues = {
/** UNAUTHENTICATED. */
UNAUTHENTICATED: 16,
} as const;
export type RpcGrpcStatusCodeValues = typeof RpcGrpcStatusCodeValues[keyof typeof RpcGrpcStatusCodeValues]
export type RpcGrpcStatusCodeValues = typeof RpcGrpcStatusCodeValues[keyof typeof RpcGrpcStatusCodeValues];



Expand All @@ -1072,5 +1072,5 @@ export const MessageTypeValues = {
/** received. */
RECEIVED: 'RECEIVED',
} as const;
export type MessageTypeValues = typeof MessageTypeValues[keyof typeof MessageTypeValues]
export type MessageTypeValues = typeof MessageTypeValues[keyof typeof MessageTypeValues];