Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
storybook-addon-prettier-source
Advanced tools
Storybook addon to show inline story source formatted using prettier and a syntax highlighter
Storybook addon to show inline story source code formatted using prettier and syntax highlighting
# yarn
yarn add --dev storybook-addon-prettier-source
# npm
npm install --save-dev storybook-addon-prettier-source
Use as a global decorator in your .storybook/config.js
file:
import { withPrettierSource } from 'storybook-addon-prettier-source';
addDecorator((story, context) => withPrettierSource(story, context));
withPrettierSource
takes an optional third parameter for configuring options
{
prettier: { /* prettier options */ },
syntaxHighlighter: { /* react-syntax-highlighter options */ }
}
We are using the standalone UMD bundle that runs in the browser, you can customise the options passed to pretter.format()
addDecorator((story, context) => withPrettierSource(story, context, {
prettier: {
parser: 'graphql',
plugin: [require("prettier/parser-graphql")]
}
}));
Customise any of the react-syntax-highlighter options to control how your source code looks
addDecorator((story, context) => withPrettierSource(story, context, {
syntaxHighlighter: { showLineNumbers: true }
}));
FAQs
Storybook addon to show inline story source code formatted using prettier and a syntax highlighter
The npm package storybook-addon-prettier-source receives a total of 44 weekly downloads. As such, storybook-addon-prettier-source popularity was classified as not popular.
We found that storybook-addon-prettier-source demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.