Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@codemirror/lint

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lint - npm Package Compare versions

Comparing version
6.9.0
to
6.9.1
+6
-0
CHANGELOG.md

@@ -0,1 +1,7 @@

## 6.9.1 (2025-10-23)
### Bug fixes
Properly display diagnostics that just cover multiple newlines as widgets.
## 6.9.0 (2025-10-02)

@@ -2,0 +8,0 @@

+24
-1

@@ -27,2 +27,3 @@ 'use strict';

let deco = new state.RangeSetBuilder(), active = [], pos = 0;
let scan = state$1.doc.iter(), scanPos = 0;
for (let i = 0;;) {

@@ -55,4 +56,26 @@ let next = i == sorted.length ? null : sorted[i];

}
let widget = false;
if (active.some(d => d.from == from && d.to == to)) {
widget = from == to;
if (!widget && to - from < 10) {
let behind = from - (scanPos + scan.value.length);
if (behind > 0) {
scan.next(behind);
scanPos = from;
}
for (let check = from;;) {
if (check >= to) {
widget = true;
break;
}
if (!scan.lineBreak && scanPos + scan.value.length > check)
break;
check = scanPos + scan.value.length;
scanPos += scan.value.length;
scan.next();
}
}
}
let sev = maxSeverity(active);
if (active.some(d => d.from == d.to || (d.from == d.to - 1 && state$1.doc.lineAt(d.from).to == d.from))) {
if (widget) {
deco.add(from, from, view.Decoration.widget({

@@ -59,0 +82,0 @@ widget: new DiagnosticWidget(sev),

@@ -25,2 +25,3 @@ import { Decoration, showPanel, EditorView, ViewPlugin, gutter, showTooltip, hoverTooltip, getPanel, logException, WidgetType, GutterMarker } from '@codemirror/view';

let deco = new RangeSetBuilder(), active = [], pos = 0;
let scan = state.doc.iter(), scanPos = 0;
for (let i = 0;;) {

@@ -53,4 +54,26 @@ let next = i == sorted.length ? null : sorted[i];

}
let widget = false;
if (active.some(d => d.from == from && d.to == to)) {
widget = from == to;
if (!widget && to - from < 10) {
let behind = from - (scanPos + scan.value.length);
if (behind > 0) {
scan.next(behind);
scanPos = from;
}
for (let check = from;;) {
if (check >= to) {
widget = true;
break;
}
if (!scan.lineBreak && scanPos + scan.value.length > check)
break;
check = scanPos + scan.value.length;
scanPos += scan.value.length;
scan.next();
}
}
}
let sev = maxSeverity(active);
if (active.some(d => d.from == d.to || (d.from == d.to - 1 && state.doc.lineAt(d.from).to == d.from))) {
if (widget) {
deco.add(from, from, Decoration.widget({

@@ -57,0 +80,0 @@ widget: new DiagnosticWidget(sev),

+1
-1
{
"name": "@codemirror/lint",
"version": "6.9.0",
"version": "6.9.1",
"description": "Linting support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {