-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
build: Re-enable eslint no-unused-vars
, no-control-regex
and no-loss-of-precision
#10049
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ export function instrumentNodeCron<T>(lib: Partial<NodeCron> & T): T { | |
// When 'get' is called for schedule, return a proxied version of the schedule function | ||
return new Proxy(target.schedule, { | ||
apply(target, thisArg, argArray: Parameters<NodeCron['schedule']>) { | ||
const [expression, _, options] = argArray; | ||
const [expression, , options] = argArray; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not in favor of sparse arrays. There is a specific eslint rule (and also for Biome) to avoid this: https://eslint.org/docs/latest/rules/no-sparse-arrays |
||
|
||
if (!options?.name) { | ||
throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,27 +5,21 @@ import type { Primitive } from './misc'; | |
* An abstract definition of the minimum required API | ||
* for a metric instance. | ||
*/ | ||
export abstract class MetricInstance { | ||
export interface MetricInstance { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did we make this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because it was incorrect. We do not want this to be an abstract class. Nothing actually extended it. I made this change specifically in this PR because previously the |
||
/** | ||
* Returns the weight of the metric. | ||
*/ | ||
public get weight(): number { | ||
return 1; | ||
} | ||
weight: number; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now becomes a variable, not a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typescript-wise, this is the same. Public API wise too! |
||
|
||
/** | ||
* Adds a value to a metric. | ||
*/ | ||
public add(value: number | string): void { | ||
// Override this. | ||
} | ||
add(value: number | string): void; | ||
|
||
/** | ||
* Serializes the metric into a statsd format string. | ||
*/ | ||
public toString(): string { | ||
return ''; | ||
} | ||
toString(): string; | ||
} | ||
|
||
export interface MetricBucketItem { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you changed the order of Promise.all array, you wouldn't have
[,
syntax