Installations
npm install @commercetools-frontend/jest-stylelint-runner
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.20.5
NPM Version
10.8.2
Score
59
Supply Chain
92
Quality
93.6
Maintenance
100
Vulnerability
97
License
Releases
Contributors
Languages
TypeScript (86.24%)
JavaScript (13.06%)
HTML (0.57%)
CSS (0.09%)
Shell (0.04%)
Developer
Download Statistics
Total Downloads
604,232
Last Day
562
Last Week
2,924
Last Month
8,988
Last Year
166,701
GitHub Statistics
70 Stars
5,514 Commits
29 Forks
17 Watching
56 Branches
352 Contributors
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
604,232
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
@commercetools-frontend/jest-stylelint-runner
Jest runner for Stylelint.
Disclaimer
@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 apostcss.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
hasstylelint
as a peer dependency.
Install
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
Usage
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
.
Define your PostCSS config
In your postcss.config.js
:
1module.exports = () => { 2 return { 3 parser: false, 4 map: false, 5 plugins: { 6 'postcss-import': {}, 7 // ... 8 }, 9 }; 10};
Recommended setup for Custom Applications
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
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
SAST tool is not run on all commits -- score normalized to 9
Details
- Warn: 29 commits out of 30 are checked with a SAST tool
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'allow deletion' disabled on branch 'main'
- Info: 'force pushes' disabled on branch 'main'
- Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'
- Warn: required approving review count is 1 on branch 'main'
- Warn: codeowners review is not required on branch 'main'
- Info: status check found to merge onto on branch 'main'
- Info: PRs are required in order to make changes on branch 'main'
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/close-inactive-issues.yml:1
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Warn: no topLevel permission defined: .github/workflows/merge-blocking-labels.yml:1
- Warn: no topLevel permission defined: .github/workflows/playground-deployment-preview.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/preview-release-on-comment.yml:5
- Info: no jobLevel write permissions found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/close-inactive-issues.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/close-inactive-issues.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:239: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:265: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:111: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:162: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:188: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:213: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:291: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:311: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/main.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/merge-blocking-labels.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/merge-blocking-labels.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground-deployment-preview.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/playground-deployment-preview.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/preview-release-on-comment.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/preview-release-on-comment.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/preview-release-on-comment.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/preview-release-on-comment.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/preview-release-on-comment.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/preview-release-on-comment.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/commercetools/merchant-center-application-kit/release.yml/main?enable=pin
- Info: 0 out of 16 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 5 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
33 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-hpx4-r86g-5jrg
- Warn: Project is vulnerable to: GHSA-prr3-c3m5-p7q2
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-593m-55hh-j8gv
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-wm7h-9275-46v2
- Warn: Project is vulnerable to: GHSA-gx9m-whjm-85jf
- Warn: Project is vulnerable to: GHSA-mmhx-hmjr-r674
- Warn: Project is vulnerable to: GHSA-f6v4-cf5j-vf3w
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-hhhv-q57g-882q
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-6pq3-928q-x6w6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
5.7
/10
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