Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@stylelint/postcss-css-in-js
Advanced tools
PostCSS syntax for parsing CSS in JS literals:
First thing's first, install the module:
npm install postcss-syntax @stylelint/postcss-css-in-js --save-dev
const postcss = require("postcss");
const stylelint = require("stylelint");
const syntax = require("postcss-syntax");
postcss([stylelint({ fix: true })])
.process(source, { syntax: syntax })
.then(function (result) {
// An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
result.content;
});
input:
import glm from "glamorous";
const Component1 = glm.a({
flexDirectionn: "row",
display: "inline-block",
color: "#fff"
});
output:
import glm from "glamorous";
const Component1 = glm.a({
color: "#fff",
display: "inline-block",
flexDirectionn: "row"
});
Add support for more css-in-js
package:
const syntax = require("postcss-syntax")({
"i-css": (index, namespace) => namespace[index + 1] === "addStyles",
"styled-components": true
});
See: postcss-syntax
The main use case of this plugin is to apply PostCSS transformations to CSS code in template literals & styles as object literals.
FAQs
PostCSS syntax for parsing CSS in JS literals
The npm package @stylelint/postcss-css-in-js receives a total of 620,274 weekly downloads. As such, @stylelint/postcss-css-in-js popularity was classified as popular.
We found that @stylelint/postcss-css-in-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.