chore: resolve remaining unbound-method lint warnings (#12206)

* chore: resolve remaining unbound-method lint warnings

Apply targeted fixes per call pattern: arrow wrappers when passing a
method as a callback, arrow-function class fields when the method
doesn't depend on `this`, and `.bind()` when capturing for later
invocation.

Also replaces the rfc6902 hasOwnProperty re-export with a small wrapper
function so callers don't reference an unbound prototype method.

* chore: memoize history.goBack callbacks

Stable identity prevents Button re-renders and avoids re-subscribing
the global keydown handler in RegisterKeyDown when the parent renders.
This commit is contained in:
Tom Moor
2026-04-28 20:49:35 -04:00
committed by GitHub
parent 87bb79250d
commit f9a2cbc1b3
12 changed files with 51 additions and 49 deletions
+11 -8
View File
@@ -174,7 +174,7 @@ export class Linear {
const [author, state, labels] = await Promise.all([
issue.creator,
issue.state,
issue.paginate(issue.labels, {}),
issue.paginate((args) => issue.labels(args), {}),
]);
if (!state || !labels) {
@@ -229,7 +229,7 @@ export class Linear {
const [lead, status, labels] = await Promise.all([
project.lead,
project.status,
project.paginate(project.labels, {}),
project.paginate((args) => project.labels(args), {}),
]);
if (!status || !labels) {
@@ -280,12 +280,15 @@ export class Linear {
return defaultCompletionPercentage;
}
const allStates = await client.paginate(client.workflowStates, {
filter: {
team: { id: { eq: team.id } },
type: { eq: "started" },
},
});
const allStates = await client.paginate(
(args) => client.workflowStates(args),
{
filter: {
team: { id: { eq: team.id } },
type: { eq: "started" },
},
}
);
const states = sortBy(
allStates.map((s) => ({
name: s.name,