-
-
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
Conversation
…loss-of-precision`
@@ -124,7 +124,7 @@ | |||
done(); | |||
}, 5_000); | |||
|
|||
childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => { | |||
childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, () => { |
Check warning
Code scanning / CodeQL
Shell command built from environment values
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.
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. |
@@ -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 comment
The 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 comment
The 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 value
parameter in the add
method was unused, causing linting errors.
@@ -13,7 +13,7 @@ sentryTest('should capture an error within a sync startSpan callback', async ({ | |||
const gotoPromise = page.goto(url); | |||
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.
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
@@ -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 comment
The 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
public get weight(): number { | ||
return 1; | ||
} | ||
weight: number; |
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.
This now becomes a variable, not a getter
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.
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.