build: Re-enable eslint no-unused-vars, no-control-regex and no-loss-of-precision#10049
build: Re-enable eslint no-unused-vars, no-control-regex and no-loss-of-precision#10049
no-unused-vars, no-control-regex and no-loss-of-precision#10049Conversation
…loss-of-precision`
anonrig
left a comment
There was a problem hiding this comment.
Variables starting with underscore is an exception to noUnusedVariables rule
|
Can you also open an issue to Biome repository? If we want to keep using Biome, we should upstream/inform Biome about the issues we find. |
| * for a metric instance. | ||
| */ | ||
| export abstract class MetricInstance { | ||
| export interface MetricInstance { |
There was a problem hiding this comment.
Why did we make this change?
There was a problem hiding this comment.
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 value parameter in the add method was unused, causing linting errors.
| const envelopePromise = getMultipleSentryEnvelopeRequests<Event>(page, 2); | ||
|
|
||
| const [_, events] = await Promise.all([gotoPromise, envelopePromise]); | ||
| const [, events] = await Promise.all([gotoPromise, envelopePromise]); |
There was a problem hiding this comment.
If you changed the order of Promise.all array, you wouldn't have [, syntax
| 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.
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
| public get weight(): number { | ||
| return 1; | ||
| } | ||
| weight: number; |
There was a problem hiding this comment.
This now becomes a variable, not a getter
There was a problem hiding this comment.
Typescript-wise, this is the same. Public API wise too!
This effectively undoes changes done in #9692
Our lint job passes even though we clearly have unused variables in our code base. Example: #10012 (comment)
This makes me not trust biome so I am adding back the eslint rules.