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-css-linter
Advanced tools
Monaco CSS Linter is a simple CSS Linter plugin for the Monaco Editor. It uses the W3C CSS Validator under the hood to verify CSS Code.
npm i monaco-css-linter
import monaco, { editor } from 'monaco-editor';
import CSSMonacoLinter from 'monaco-css-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: 'css code here ...',
language: 'css',
});
const linter = new CSSMonacoLinter(editor, monaco);
linter.watch();
You can get the linter response in this way :
import { CSSMonacoMarks } from 'monaco-css-linter';
//...
const cssCode = editor.getValue();
const report = new CSSMonacoMarks(cssCode);
const response = report.getLinterResponse();
CSSMonacoLinter(editor: editor.IStandaloneCodeEditor, monaco: Monaco, options?: OptionsWithoutWarnings)
editor: editor.IStandaloneCodeEditor
The object returned when you create an editor.monaco: typeof monaco
The monaco variable.options?: OptionsWithoutWarnings
w3c validator options.lint
() => void: Lint one time the editor
.watch
() => void: Lint the editor
each time the onChange
event is triggered.CSSMonacoMarks(css: string, options?: OptionsWithoutWarnings, model?: editor.ITextModel)
css: string
The codoe to verify.options?: OptionsWithoutWarnings
w3c validator options.model?: editor.ITextModel
the model of the editor
.linterResponse?: ValidateTextResultWithoutWarnings
Value returned by the W3C CSS Validator.async getEditorMarks(monaco: Monaco): Promise<editor.IMarkerData[]>
Return the monaco markers.getLinterResponse(): ValidateTextResultWithoutWarnings | undefined
async requestLint(): Promise<ValidateTextResultWithoutWarnings>
Start the CSS linter asynchronously.MIT, see the LICENSE file for detail.
FAQs
Simple CSS Linter for the Monaco Editor.
The npm package monaco-css-linter receives a total of 1 weekly downloads. As such, monaco-css-linter popularity was classified as not popular.
We found that monaco-css-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.