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.2.0 to 6.2.1

6

CHANGELOG.md

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

## 6.2.1 (2023-04-13)
### Bug fixes
The `linter` function now eagerly includes all lint-related extensions, rather than appending them to the configuration as-needed, so that turning off linting by clearing the compartment that contains it works properly.
## 6.2.0 (2023-02-27)

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

34

dist/index.js

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

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

@@ -53,13 +53,3 @@ import elt from 'crelt';

function maybeEnableLint(state, effects) {
return state.field(lintState, false) ? effects : effects.concat(StateEffect.appendConfig.of([
lintState,
EditorView.decorations.compute([lintState], state => {
let { selected, panel } = state.field(lintState);
return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([
activeMark.range(selected.from, selected.to)
]);
}),
hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
baseTheme
]));
return state.field(lintState, false) ? effects : effects.concat(StateEffect.appendConfig.of(lintExtensions));
}

@@ -252,4 +242,3 @@ /**

}));
},
enables: lintPlugin
}
});

@@ -262,3 +251,7 @@ /**

function linter(source, config = {}) {
return lintConfig.of({ source, config });
return [
lintConfig.of({ source, config }),
lintPlugin,
lintExtensions
];
}

@@ -725,2 +718,13 @@ /**

});
const lintExtensions = [
lintState,
/*@__PURE__*/EditorView.decorations.compute([lintState], state => {
let { selected, panel } = state.field(lintState);
return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([
activeMark.range(selected.from, selected.to)
]);
}),
/*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
baseTheme
];
const lintGutterConfig = /*@__PURE__*/Facet.define({

@@ -727,0 +731,0 @@ combine(configs) {

{
"name": "@codemirror/lint",
"version": "6.2.0",
"version": "6.2.1",
"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