@codemirror/lint
Advanced tools
Comparing version 6.4.0 to 6.4.1
@@ -0,1 +1,7 @@ | ||
## 6.4.1 (2023-08-26) | ||
### Bug fixes | ||
Fix a crash that could occur when a view was reconfigured in a way that removed the lint extension. | ||
## 6.4.0 (2023-07-03) | ||
@@ -2,0 +8,0 @@ |
@@ -5,3 +5,3 @@ import * as _codemirror_state from '@codemirror/state'; | ||
declare type Severity = "hint" | "info" | "warning" | "error"; | ||
type Severity = "hint" | "info" | "warning" | "error"; | ||
/** | ||
@@ -66,3 +66,3 @@ Describes a problem or hint for a piece of code. | ||
} | ||
declare type DiagnosticFilter = (diagnostics: readonly Diagnostic[]) => Diagnostic[]; | ||
type DiagnosticFilter = (diagnostics: readonly Diagnostic[]) => Diagnostic[]; | ||
interface LintConfig { | ||
@@ -148,3 +148,3 @@ /** | ||
*/ | ||
declare type LintSource = (view: EditorView) => readonly Diagnostic[] | Promise<readonly Diagnostic[]>; | ||
type LintSource = (view: EditorView) => readonly Diagnostic[] | Promise<readonly Diagnostic[]>; | ||
/** | ||
@@ -151,0 +151,0 @@ Given a diagnostic source, this function returns an extension that |
@@ -223,3 +223,3 @@ import { Decoration, showPanel, EditorView, ViewPlugin, logException, gutter, showTooltip, hoverTooltip, getPanel, WidgetType, GutterMarker } from '@codemirror/view'; | ||
if (now < this.lintTime - 10) { | ||
setTimeout(this.run, this.lintTime - now); | ||
this.timeout = setTimeout(this.run, this.lintTime - now); | ||
} | ||
@@ -638,4 +638,4 @@ else { | ||
let rect = marker.getBoundingClientRect(); | ||
if (event.clientX > rect.left - 10 /* Margin */ && event.clientX < rect.right + 10 /* Margin */ && | ||
event.clientY > rect.top - 10 /* Margin */ && event.clientY < rect.bottom + 10 /* Margin */) | ||
if (event.clientX > rect.left - 10 /* Hover.Margin */ && event.clientX < rect.right + 10 /* Hover.Margin */ && | ||
event.clientY > rect.top - 10 /* Hover.Margin */ && event.clientY < rect.bottom + 10 /* Hover.Margin */) | ||
return; | ||
@@ -761,3 +761,3 @@ for (let target = event.target; target; target = target.parentNode) { | ||
return combineConfig(configs, { | ||
hoverTime: 300 /* Time */, | ||
hoverTime: 300 /* Hover.Time */, | ||
markerFilter: null, | ||
@@ -764,0 +764,0 @@ tooltipFilter: null |
{ | ||
"name": "@codemirror/lint", | ||
"version": "6.4.0", | ||
"version": "6.4.1", | ||
"description": "Linting support for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
80018
1750