mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user