Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/server/src/lintBufferApi

POST /api/lint-buffer -- buffer-scope rule diagnostics for one unsaved editor buffer (the core's lintBuffer, packages/core/lint-buffer.mjs; see its header for exactly which rules run here vs.

Cockpit server, next. Source: ui/server/src/lintBufferApi.mjs.

Variables#

MAX_VIOLATIONS#

const MAX_VIOLATIONS: 500 = 500

Defined in: ui/server/src/lintBufferApi.mjs:12

Functions#

handleLintBuffer()#

handleLintBuffer(ctx): object

Defined in: ui/server/src/lintBufferApi.mjs:19

Parameters#

ctx
clientOrigin

string

file?

string

findRoot?

Function = findProjectRoot

lint?

Function = lintBuffer

log?

any = serverLog

now?

() => number = Date.now

origin?

string

projectDir?

string

source?

string

Returns#

object

body

body: any

status

status: number