
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
postcss-validator
Advanced tools
PostCSS is very flexible CSS parser, so we can extend CSS syntax easily. But, The output of PostCSS plugins may not be valid CSS string. postcss-validator can check if an input string is valid CSS.
postcss-validator can check to using the followings:
Input:
.class {
color: tomato;
.nested {
color: lime;
}
}
Yield:
CssSyntaxError: postcss-validator: <css input>:2:3: Nested rules [.nested]
Input:
.class {
margintop: 10px;
}
Yield:
CssSyntaxError: postcss-validator: <css input>:2:3: Unknown property [margintop] is used
$ npm install postcss-validator
Set postcss-validator at the bottom of loaded PostCSS plugins.
// dependencies
var fs = require("fs")
var postcss = require("postcss")
var customProperties = require("postcss-custom-properties")
var nesting = require("postcss-nesting")
var validator = require("postcss-validator")
// css to be processed
var css = fs.readFileSync("input.css", "utf8")
// process css
var output = postcss()
.use(customProperties())
.use(nesting())
.use(validator())
.process(css)
.css
The MIT License (MIT)
Copyright (c) 2017 Masaaki Morishita
FAQs
PostCSS plugin to check if an input string is valid CSS
The npm package postcss-validator receives a total of 98 weekly downloads. As such, postcss-validator popularity was classified as not popular.
We found that postcss-validator 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.