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

Upgrade typescript-eslint to 2.8.0 #50956

Merged
merged 3 commits into from
Nov 19, 2019
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@
"@types/uuid": "^3.4.4",
"@types/vinyl-fs": "^2.4.11",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"@typescript-eslint/parser": "^2.8.0",
"angular-mocks": "^1.7.8",
"archiver": "^3.1.1",
"axe-core": "^3.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"homepage": "https://github.com/elastic/eslint-config-kibana#readme",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"@typescript-eslint/parser": "^2.8.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.5.1",
"eslint-plugin-babel": "^5.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ export function DetailView({ errorGroup, urlParams, location }: Props) {
const errorUrl = error.error.page?.url || error.url?.full;

const method = error.http?.request.method;
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const status = error.http?.response?.status_code;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export class ServiceIntegrations extends React.Component<Props, State> {
panels={[
{
id: 0,
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
items: this.getPanelItems(license.features.ml?.is_available)
}
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,17 @@ export function AddEditFlyout({

// config settings
const [sampleRate, setSampleRate] = useState<string>(
// TODO(TS-3.7-ESLINT)
(
selectedConfig?.settings.transaction_sample_rate || // eslint-disable-line @typescript-eslint/camelcase
selectedConfig?.settings.transaction_sample_rate ||
defaultSettings.TRANSACTION_SAMPLE_RATE
).toString()
);
const [captureBody, setCaptureBody] = useState<string>(
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
selectedConfig?.settings.capture_body || defaultSettings.CAPTURE_BODY
);
const [transactionMaxSpans, setTransactionMaxSpans] = useState<string>(
// TODO(TS-3.7-ESLINT)
(
selectedConfig?.settings.transaction_max_spans || // eslint-disable-line @typescript-eslint/camelcase
selectedConfig?.settings.transaction_max_spans ||
defaultSettings.TRANSACTION_MAX_SPANS
).toString()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ export function SpanFlyout({
const dbContext = span.span.db;
const httpContext = span.span.http;
const spanTypes = getSpanTypes(span);
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const spanHttpStatusCode = httpContext?.response.status_code;
const spanHttpUrl = httpContext?.url?.original;
const spanHttpMethod = httpContext?.method;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const getTransactionResultSummaryItem = (transaction: Transaction) => {

if (url) {
const method = transaction.http?.request.method;
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const status = transaction.http?.response?.status_code;

return <HttpInfoSummaryItem method={method} status={status} url={url} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ export class TransactionCharts extends Component<TransactionChartProps> {
</EuiFlexItem>
<LicenseContext.Consumer>
{license =>
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
this.renderMLHeader(license.features.ml?.is_available)
}
</LicenseContext.Consumer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export async function getErrorGroups({

// aggregations can be undefined when no matching indices are found.
// this is an exception rather than the rule so the ES type does not account for this.
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const hits = (resp.aggregations?.error_groups.buckets || []).map(bucket => {
const source = bucket.sample.hits.hits[0]._source;
const message =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,9 @@ export async function getServicesItems(setup: Setup) {
const eventTypes = bucket.events.buckets;

const transactions = eventTypes.find(e => e.key === 'transaction');
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const totalTransactions = transactions?.doc_count || 0;

const errors = eventTypes.find(e => e.key === 'error');
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const totalErrors = errors?.doc_count || 0;

const deltaAsMinutes = (end - start) / 1000 / 60;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export async function getAgentNameByService({
};

const { aggregations } = await client.search(params);
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const agentName = aggregations?.agent_names.buckets[0].key as
| string
| undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export async function getTransactionBreakdown({

const kpiNames = kpis.map(kpi => kpi.name);

// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const bucketsByDate = resp.aggregations?.by_date.buckets || [];

const timeseriesPerSubtype = bucketsByDate.reduce((prev, bucket) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export async function getMlBucketSize({

try {
const resp = await client.search<ESResponse, typeof params>(params);
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
return resp.hits.hits[0]?._source.bucket_span || 0;
} catch (err) {
const isHttpError = 'statusCode' in err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ function getESResponse(buckets: any): ESResponse {
lower: { value: bucket?.lower?.value || null },
upper: { value: bucket?.upper?.value || null },
anomaly_score: {
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
value: bucket?.anomaly_score?.value || null
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export function anomalySeriesTransform(
timeSeriesDates: number[]
) {
const buckets =
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
response.aggregations?.ml_avg_response_times.buckets.map(getBucket) || [];

const bucketSizeInMillis = Math.max(bucketSize, mlBucketSize) * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@ export function timeseriesTransformer({
bucketSize: number;
}) {
const aggs = timeseriesResponse.aggregations;
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const overallAvgDuration = aggs?.overall_avg_duration.value || null;
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const responseTimeBuckets = aggs?.response_times.buckets || [];
const { avg, p95, p99 } = getResponseTime(responseTimeBuckets);
// TODO(TS-3.7-ESLINT)
// eslint-disable-next-line @typescript-eslint/camelcase
const transactionResultBuckets = aggs?.transaction_results.buckets || [];
const tpmBuckets = getTpmBuckets(transactionResultBuckets, bucketSize);

Expand Down
66 changes: 43 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4209,24 +4209,24 @@
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d"
integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==

"@typescript-eslint/eslint-plugin@^2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.7.0.tgz#dff176bdb73dfd7e2e43062452189bd1b9db6021"
integrity sha512-H5G7yi0b0FgmqaEUpzyBlVh0d9lq4cWG2ap0RKa6BkF3rpBb6IrAoubt1NWh9R2kRs/f0k6XwRDiDz3X/FqXhQ==
"@typescript-eslint/eslint-plugin@^2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.8.0.tgz#eca584d46094ebebc3cb3e9fb625bfbc904a534d"
integrity sha512-ohqul5s6XEB0AzPWZCuJF5Fd6qC0b4+l5BGEnrlpmvXxvyymb8yw8Bs4YMF8usNAeuCJK87eFIHy8g8GFvOtGA==
dependencies:
"@typescript-eslint/experimental-utils" "2.7.0"
eslint-utils "^1.4.2"
"@typescript-eslint/experimental-utils" "2.8.0"
eslint-utils "^1.4.3"
functional-red-black-tree "^1.0.1"
regexpp "^2.0.1"
regexpp "^3.0.0"
tsutils "^3.17.1"

"@typescript-eslint/experimental-utils@2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz#58d790a3884df3041b5a5e08f9e5e6b7c41864b5"
integrity sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==
"@typescript-eslint/experimental-utils@2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz#208b4164d175587e9b03ce6fea97d55f19c30ca9"
integrity sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.7.0"
"@typescript-eslint/typescript-estree" "2.8.0"
eslint-scope "^5.0.0"

"@typescript-eslint/experimental-utils@^1.13.0":
Expand All @@ -4238,14 +4238,14 @@
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-scope "^4.0.0"

"@typescript-eslint/parser@^2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.7.0.tgz#b5e6a4944e2b68dba1e7fbfd5242e09ff552fd12"
integrity sha512-ctC0g0ZvYclxMh/xI+tyqP0EC2fAo6KicN9Wm2EIao+8OppLfxji7KAGJosQHSGBj3TcqUrA96AjgXuKa5ob2g==
"@typescript-eslint/parser@^2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.8.0.tgz#e10f7c40c8cf2fb19920c879311e6c46ad17bacb"
integrity sha512-NseXWzhkucq+JM2HgqAAoKEzGQMb5LuTRjFPLQzGIdLthXMNUfuiskbl7QSykvWW6mvzCtYbw1fYWGa2EIaekw==
dependencies:
"@types/eslint-visitor-keys" "^1.0.0"
"@typescript-eslint/experimental-utils" "2.7.0"
"@typescript-eslint/typescript-estree" "2.7.0"
"@typescript-eslint/experimental-utils" "2.8.0"
"@typescript-eslint/typescript-estree" "2.8.0"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/[email protected]":
Expand All @@ -4256,13 +4256,14 @@
lodash.unescape "4.0.1"
semver "5.5.0"

"@typescript-eslint/typescript-estree@2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz#34fd98c77a07b40d04d5b4203eddd3abeab909f4"
integrity sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==
"@typescript-eslint/typescript-estree@2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz#fcc3fe6532840085d29b75432c8a59895876aeca"
integrity sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==
dependencies:
debug "^4.1.1"
glob "^7.1.4"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash.unescape "4.0.1"
semver "^6.3.0"
Expand Down Expand Up @@ -11388,6 +11389,13 @@ eslint-utils@^1.4.2:
dependencies:
eslint-visitor-keys "^1.0.0"

eslint-utils@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
dependencies:
eslint-visitor-keys "^1.1.0"

eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
Expand Down Expand Up @@ -13483,6 +13491,18 @@ glob@^6.0.1, glob@^6.0.4:
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@~7.0.0:
version "7.0.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
Expand Down