
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@commercetools-frontend/jest-stylelint-runner
Advanced tools
Jest runner that will transform css with postcss before running stylelint
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.
yarn add --dev jest postcss stylelint @commercetools-frontend/jest-stylelint-runner
# or with NPM
npm install --save-dev jest postcss stylelint @commercetools-frontend/jest-stylelint-runner
Add it to your Jest config.
In your package.json:
{
"jest": {
"runner": "@commercetools-frontend/jest-stylelint-runner",
"moduleFileExtensions": ["css"],
"testMatch": ["**/*.css"]
}
}
Or in jest.stylelint.config.js:
module.exports = {
runner: '@commercetools-frontend/jest-stylelint-runner',
displayName: 'stylelint',
moduleFileExtensions: ['css'],
testMatch: ['**/*.css'],
};
Run it as jest --config jest.stylelint.config.js.
In your postcss.config.js:
module.exports = () => {
return {
parser: false,
map: false,
plugins: {
'postcss-import': {},
// ...
},
};
};
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:
/**
* @type {import('stylelint').Config}
*/
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
plugins: ['stylelint-order', 'stylelint-value-no-unknown-custom-properties'],
rules: {
// other rules...
'csstools/value-no-unknown-custom-properties': [
true,
{
importFrom: [
'node_modules/@commercetools-uikit/design-system/materials/custom-properties.css',
],
},
],
},
};
Furthermore, the postcss.config.js should be configured as following:
const { createPostcssConfig } = require('@commercetools-frontend/mc-scripts');
// Re-export the pre-configured `postcss.config.js`.
// This file is only used by file/scripts in this repository, for example linters etc.
module.exports = createPostcssConfig();
You can also customize some of the plugins (see function signature).
FAQs
Jest runner that will transform css with postcss before running stylelint
The npm package @commercetools-frontend/jest-stylelint-runner receives a total of 1,637 weekly downloads. As such, @commercetools-frontend/jest-stylelint-runner popularity was classified as popular.
We found that @commercetools-frontend/jest-stylelint-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.