Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
monaco-html-linter
Advanced tools
Monaco HTML Linter is a simple HTML Linter plugin for the Monaco Editor. It uses HTMLHint under the hood to verify HTML Code.
npm i monaco-html-linter
import monaco, { editor } from 'monaco-editor';
import HTMLMonacoLinter from 'monaco-html-linter';
// The Monaco Editor can be easily created, given an
// empty container and an options literal.
// Two members of the literal are "value" and "language".
// The editor takes the full size of its container.
const editor = monaco.editor.create(document.getElementById('container'), {
value: 'html code here ...',
language: 'html'
});
const linter = new HTMLMonacoLinter(editor, monaco);
linter.watch();
You can get the linter response in this way :
import { HTMLMonacoMarks } from 'monaco-html-linter';
//...
const htmlCode = editor.getValue();
const report = new HTMLMonacoMarks(htmlCode);
const response = report.getLinterResponse();
HTMLMonacoLinter(editor: editor.IStandaloneCodeEditor, monaco: Monaco, ruleset?: Ruleset)
editor: editor.IStandaloneCodeEditor
The object returned when you create an editor.monaco: typeof monaco
The monaco variable.ruleset?: Ruleset
HTMLHint ruleset options.lint
() => void: Lint one time the editor
.watch
() => void: Lint the editor
each time the onChange
event is triggered.HTMLMonacoMarks(html: string, ruleset: Ruleset = defaultRuleset, model?: editor.ITextModel)
html: string
The codoe to verify.ruleset: Ruleset
HTMLHint ruleset options.linterResponse: Hint[]
Value returned by HTMLHint.model?: editor.ITextModel
getEditorMarks(monaco: Monaco): IMarkerData[]
Return the monaco markers.getLinterResponse(): Hint[]
lint(): Hint[]
MIT, see the LICENSE file for detail.
FAQs
Simple HTML Linter for the Monaco Editor.
The npm package monaco-html-linter receives a total of 283 weekly downloads. As such, monaco-html-linter popularity was classified as not popular.
We found that monaco-html-linter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.