Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codemirror/lint

Package Overview
Dependencies
Maintainers
2
Versions
37
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.1.1 to 6.2.0

6

CHANGELOG.md

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

## 6.2.0 (2023-02-27)
### New features
The new `needsRefresh` option to `linter` makes it possible to cause linting to be recalculated for non-document state changes.
## 6.1.1 (2023-02-15)

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

8

dist/index.d.ts
import * as _codemirror_state from '@codemirror/state';
import { EditorState, TransactionSpec, Extension } from '@codemirror/state';
import { EditorView, Command, KeyBinding } from '@codemirror/view';
import { EditorView, Command, KeyBinding, ViewUpdate } from '@codemirror/view';

@@ -67,2 +67,8 @@ /**

/**
Optional predicate that can be used to indicate when diagnostics
need to be recomputed. Linting is always re-done on document
changes.
*/
needsRefresh?: null | ((update: ViewUpdate) => boolean);
/**
Optional filter to determine which diagnostics produce markers

@@ -69,0 +75,0 @@ in the content.

8

dist/index.js

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

let config = update.state.facet(lintConfig);
if (update.docChanged || config != update.startState.facet(lintConfig)) {
if (update.docChanged || config != update.startState.facet(lintConfig) ||
config.needsRefresh && config.needsRefresh(update)) {
this.lintTime = Date.now() + config.delay;

@@ -246,3 +247,6 @@ if (!this.set) {

markerFilter: null,
tooltipFilter: null
tooltipFilter: null,
needsRefresh: null
}, {
needsRefresh: (a, b) => !a ? b : !b ? a : u => a(u) || b(u)
}));

@@ -249,0 +253,0 @@ },

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc