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
1
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.5
to
6.9.6
+6
-0
CHANGELOG.md

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

## 6.9.6 (2026-05-06)
### Bug fixes
Pop open a diagnostic's tooltip when moving to it with `nextDiagnostic` or `previousDiagnostic`.
## 6.9.5 (2026-03-02)

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

+20
-9

@@ -242,7 +242,7 @@ 'use strict';

*/
const nextDiagnostic = (view) => {
let field = view.state.field(lintState, false);
const nextDiagnostic = (view$1) => {
let field = view$1.state.field(lintState, false);
if (!field)
return false;
let sel = view.state.selection.main, next = findDiagnostic(field.diagnostics, null, sel.to + 1);
let sel = view$1.state.selection.main, next = findDiagnostic(field.diagnostics, null, sel.to + 1);
if (!next) {

@@ -253,3 +253,7 @@ next = findDiagnostic(field.diagnostics, null, 0);

}
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
view$1.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
view.activateHover(view$1, next.from, 1, {
tooltip: lintHover,
until: tr => tr.docChanged || tr.newSelection.main.head < next.from || tr.newSelection.main.head > next.to
});
return true;

@@ -260,4 +264,5 @@ };

*/
const previousDiagnostic = (view) => {
let { state } = view, field = state.field(lintState, false);
const previousDiagnostic = (view$1) => {
var _a;
let { state } = view$1, field = state.field(lintState, false);
if (!field)

@@ -279,3 +284,8 @@ return false;

return false;
view.dispatch({ selection: { anchor: prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, head: prevTo !== null && prevTo !== void 0 ? prevTo : lastTo }, scrollIntoView: true });
let from = prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, to = (_a = prevTo !== null && prevTo !== void 0 ? prevTo : lastTo) !== null && _a !== void 0 ? _a : from;
view$1.dispatch({ selection: { anchor: from, head: to }, scrollIntoView: true });
view.activateHover(view$1, from, 1, {
tooltip: lintHover,
until: tr => tr.docChanged || tr.newSelection.main.head < from || tr.newSelection.main.head > to
});
return true;

@@ -674,3 +684,3 @@ };

},
".cm-lintRange-error": { backgroundImage: underline("#d11") },
".cm-lintRange-error": { backgroundImage: underline("#f11") },
".cm-lintRange-warning": { backgroundImage: underline("orange") },

@@ -894,2 +904,3 @@ ".cm-lintRange-info": { backgroundImage: underline("#999") },

});
const lintHover = view.hoverTooltip(lintTooltip, { hideOn: hideTooltip });
const lintExtensions = [

@@ -903,3 +914,3 @@ lintState,

}),
view.hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
lintHover,
baseTheme

@@ -906,0 +917,0 @@ ];

@@ -1,2 +0,2 @@

import { Decoration, showPanel, EditorView, ViewPlugin, gutter, showTooltip, hoverTooltip, getPanel, logException, WidgetType, GutterMarker } from '@codemirror/view';
import { Decoration, showPanel, EditorView, ViewPlugin, gutter, showTooltip, hoverTooltip, getPanel, activateHover, logException, WidgetType, GutterMarker } from '@codemirror/view';
import { StateEffect, StateField, Facet, combineConfig, RangeSet, RangeSetBuilder } from '@codemirror/state';

@@ -251,2 +251,6 @@ import elt from 'crelt';

view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
activateHover(view, next.from, 1, {
tooltip: lintHover,
until: tr => tr.docChanged || tr.newSelection.main.head < next.from || tr.newSelection.main.head > next.to
});
return true;

@@ -258,2 +262,3 @@ };

const previousDiagnostic = (view) => {
var _a;
let { state } = view, field = state.field(lintState, false);

@@ -276,3 +281,8 @@ if (!field)

return false;
view.dispatch({ selection: { anchor: prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, head: prevTo !== null && prevTo !== void 0 ? prevTo : lastTo }, scrollIntoView: true });
let from = prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, to = (_a = prevTo !== null && prevTo !== void 0 ? prevTo : lastTo) !== null && _a !== void 0 ? _a : from;
view.dispatch({ selection: { anchor: from, head: to }, scrollIntoView: true });
activateHover(view, from, 1, {
tooltip: lintHover,
until: tr => tr.docChanged || tr.newSelection.main.head < from || tr.newSelection.main.head > to
});
return true;

@@ -671,3 +681,3 @@ };

},
".cm-lintRange-error": { backgroundImage: /*@__PURE__*/underline("#d11") },
".cm-lintRange-error": { backgroundImage: /*@__PURE__*/underline("#f11") },
".cm-lintRange-warning": { backgroundImage: /*@__PURE__*/underline("orange") },

@@ -891,2 +901,3 @@ ".cm-lintRange-info": { backgroundImage: /*@__PURE__*/underline("#999") },

});
const lintHover = /*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip });
const lintExtensions = [

@@ -900,3 +911,3 @@ lintState,

}),
/*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
lintHover,
baseTheme

@@ -903,0 +914,0 @@ ];

{
"name": "@codemirror/lint",
"version": "6.9.5",
"version": "6.9.6",
"description": "Linting support for the CodeMirror code editor",

@@ -30,3 +30,3 @@ "scripts": {

"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.35.0",
"@codemirror/view": "^6.42.0",
"crelt": "^1.0.5"

@@ -39,4 +39,4 @@ },

"type": "git",
"url": "git+https://github.com/codemirror/lint.git"
"url": "git+https://code.haverbeke.berlin/codemirror/lint.git"
}
}
# @codemirror/lint [![NPM version](https://img.shields.io/npm/v/@codemirror/lint.svg)](https://www.npmjs.org/package/@codemirror/lint)
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#lint) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lint/blob/main/CHANGELOG.md) ]
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#lint) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lint/src/branch/main/CHANGELOG.md) ]

@@ -13,3 +13,3 @@ This package implements linting support for the

This code is released under an
[MIT license](https://github.com/codemirror/lint/tree/main/LICENSE).
[MIT license](https://code.haverbeke.berlin/codemirror/lint/tree/main/LICENSE).

@@ -16,0 +16,0 @@ We aim to be an inclusive, welcoming community. To make that explicit,

name: Trigger CI
on: push
jobs:
build:
name: Dispatch to main repo
runs-on: ubuntu-latest
steps:
- name: Emit repository_dispatch
uses: mvasigh/dispatch-action@main
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.DISPATCH_AUTH }}
repo: dev
owner: codemirror
event_type: push