Gathering detailed insights and metrics for @stylelint/postcss-css-in-js
Gathering detailed insights and metrics for @stylelint/postcss-css-in-js
Gathering detailed insights and metrics for @stylelint/postcss-css-in-js
Gathering detailed insights and metrics for @stylelint/postcss-css-in-js
PostCSS syntax for parsing CSS in JS literals
npm install @stylelint/postcss-css-in-js
Typescript
Module System
Node Version
NPM Version
JavaScript (99.86%)
Shell (0.14%)
Total Downloads
292,771,725
Last Day
134,906
Last Week
638,675
Last Month
2,952,888
Last Year
42,653,691
41 Stars
326 Commits
18 Forks
6 Watching
9 Branches
20 Contributors
Minified
Minified + Gzipped
Latest Version
0.38.0
Package Id
@stylelint/postcss-css-in-js@0.38.0
Unpacked Size
39.55 kB
Size
12.31 kB
File Count
23
NPM Version
8.8.0
Node Version
16.14.2
Cumulative downloads
Total Downloads
Last day
-12.5%
134,906
Compared to previous day
Last week
-18%
638,675
Compared to previous week
Last month
-2.1%
2,952,888
Compared to previous month
Last year
-25.4%
42,653,691
Compared to previous year
1
2
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
1const postcss = require("postcss"); 2const stylelint = require("stylelint"); 3const syntax = require("postcss-syntax"); 4postcss([stylelint({ fix: true })]) 5 .process(source, { syntax: syntax }) 6 .then(function (result) { 7 // An alias for the result.css property. Use it with syntaxes that generate non-CSS output. 8 result.content; 9 });
input:
1import glm from "glamorous"; 2const Component1 = glm.a({ 3 flexDirectionn: "row", 4 display: "inline-block", 5 color: "#fff" 6});
output:
1import glm from "glamorous"; 2const Component1 = glm.a({ 3 color: "#fff", 4 display: "inline-block", 5 flexDirectionn: "row" 6});
Add support for more css-in-js
package:
1const syntax = require("postcss-syntax")({ 2 "i-css": (index, namespace) => namespace[index + 1] === "addStyles", 3 "styled-components": true 4});
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/11 approved changesets -- score normalized to 4
Reason
security policy file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
24 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More