1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Eslint review, round 1 (#58168)

This commit is contained in:
Kevin Heis
2025-10-27 15:01:39 -07:00
committed by GitHub
parent f57c6ec88f
commit 232a0f8516
73 changed files with 246 additions and 182 deletions

View File

@@ -37,7 +37,7 @@ const notRegex = /(?:^|\s)not\s/
// native Liquid `if` block tag. It has special handling for statements like {% ifversion ghes < 3.0 %},
// using semver to evaluate release numbers instead of doing standard number comparisons, which
// don't work the way we want because they evaluate 3.2 > 3.10 = true.
export default class extends Tag {
export default class Ifversion extends Tag {
tagToken: TagToken
branches: Branch[]
elseTemplates: Template[]

View File

@@ -29,7 +29,7 @@ export const Prompt: LiquidTag = {
},
// Render the inner Markdown, wrap in <code>, then append the SVG
render: function* (scope: any): Generator<any, string, unknown> {
*render(scope: any): Generator<any, string, unknown> {
const content = yield this.liquid.renderer.renderTemplates(this.templates, scope)
// build a URL with the prompt text encoded as query parameter

View File

@@ -53,7 +53,7 @@ export const Spotlight = {
stream.start()
},
render: function* (scope: Record<string, unknown>): Generator<unknown, unknown, unknown> {
*render(scope: Record<string, unknown>): Generator<unknown, unknown, unknown> {
const output = yield this.liquid!.renderer.renderTemplates(this.templates, scope)
return yield this.liquid!.parseAndRender(template, {

View File

@@ -66,7 +66,7 @@ export const Tool = {
},
// scope is a Liquid scope object, Generator yields/returns Liquid template values - no TypeScript definitions available
render: function* (scope: any): Generator<any, any, any> {
*render(scope: any): Generator<any, any, any> {
const output = yield this.liquid.renderer.renderTemplates(this.templates, scope)
return yield this.liquid.parseAndRender(template, {
tagName: this.tagName,