Gathering detailed insights and metrics for @commercetools-frontend/jest-stylelint-runner
Gathering detailed insights and metrics for @commercetools-frontend/jest-stylelint-runner
Gathering detailed insights and metrics for @commercetools-frontend/jest-stylelint-runner
Gathering detailed insights and metrics for @commercetools-frontend/jest-stylelint-runner
npm install @commercetools-frontend/jest-stylelint-runner
Typescript
Module System
Node Version
NPM Version
59
Supply Chain
92
Quality
93.6
Maintenance
100
Vulnerability
97
License
TypeScript (86.24%)
JavaScript (13.06%)
HTML (0.57%)
CSS (0.09%)
Shell (0.04%)
Total Downloads
604,232
Last Day
562
Last Week
2,924
Last Month
8,988
Last Year
166,701
70 Stars
5,514 Commits
29 Forks
17 Watching
56 Branches
352 Contributors
Latest Version
22.38.3
Package Id
@commercetools-frontend/jest-stylelint-runner@22.38.3
Unpacked Size
6.98 kB
Size
2.92 kB
File Count
5
NPM Version
10.8.2
Node Version
18.20.5
Publised On
21 Jan 2025
Cumulative downloads
Total Downloads
Last day
-19.9%
562
Compared to previous day
Last week
-1.3%
2,924
Compared to previous week
Last month
59.8%
8,988
Compared to previous month
Last year
-15.2%
166,701
Compared to previous year
2
Jest runner for Stylelint.
@commercetools-frontend/jest-stylelint-runner
is inspired by jest-runner-stylelint.
However, it has two main distinctions.
jest-stylelint-runner
will process your CSS with PostCSS given a postcss.config.js
file in your project. This means that it can resolve imports and custom properties through the use of PostCSS plugins.jest-stylelint-runner
has stylelint
as a peer dependency.Install jest
(it needs Jest 21+),jest-stylelint-runner
, postcss
and any PostCSS plugins you need.
1yarn add --dev jest postcss stylelint @commercetools-frontend/jest-stylelint-runner 2 3# or with NPM 4 5npm install --save-dev jest postcss stylelint @commercetools-frontend/jest-stylelint-runner
Add it to your Jest config.
In your package.json
:
1{ 2 "jest": { 3 "runner": "@commercetools-frontend/jest-stylelint-runner", 4 "moduleFileExtensions": ["css"], 5 "testMatch": ["**/*.css"] 6 } 7}
Or in jest.stylelint.config.js
:
1module.exports = { 2 runner: '@commercetools-frontend/jest-stylelint-runner', 3 displayName: 'stylelint', 4 moduleFileExtensions: ['css'], 5 testMatch: ['**/*.css'], 6};
Run it as jest --config jest.stylelint.config.js
.
In your postcss.config.js
:
1module.exports = () => { 2 return { 3 parser: false, 4 map: false, 5 plugins: { 6 'postcss-import': {}, 7 // ... 8 }, 9 }; 10};
If you are developing Custom Applications for commercetools's Merchant Center, and are using CSS Modules, we recommend to additionally install the following dependencies:
yarn add -E postcss-syntax stylelint-config-prettier stylelint-config-standard stylelint-order stylelint-value-no-unknown-custom-properties
Then configure Stylelint as following:
1/** 2 * @type {import('stylelint').Config} 3 */ 4module.exports = { 5 extends: ['stylelint-config-standard', 'stylelint-config-prettier'], 6 plugins: ['stylelint-order', 'stylelint-value-no-unknown-custom-properties'], 7 rules: { 8 // other rules... 9 'csstools/value-no-unknown-custom-properties': [ 10 true, 11 { 12 importFrom: [ 13 'node_modules/@commercetools-uikit/design-system/materials/custom-properties.css', 14 ], 15 }, 16 ], 17 }, 18};
Furthermore, the postcss.config.js
should be configured as following:
1const { createPostcssConfig } = require('@commercetools-frontend/mc-scripts'); 2 3// Re-export the pre-configured `postcss.config.js`. 4// This file is only used by file/scripts in this repository, for example linters etc. 5module.exports = createPostcssConfig();
You can also customize some of the plugins (see function signature).
No vulnerabilities found.
Reason
all changesets reviewed
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool is not run on all commits -- score normalized to 9
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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