Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@acot/acot-runner-storybook

Package Overview
Dependencies
10
Maintainers
1
Versions
38
Issues
File Explorer

Advanced tools

@acot/acot-runner-storybook

An acot custom runner for Storybook.

    0.0.18latest

Version published
Maintainers
1
Yearly downloads
5,399
increased by129.84%

Weekly downloads

Changelog

Source

0.0.18 (2022-05-11)

Features

  • acot-preset-wcag: add ignore option to dialog-focus rule (959bcbc)
  • acot-preset-wcag: add ignore option to img-has-name rule (36a152e)
  • acot-preset-wcag: add ignore option to interactive-has-enough-size rule (640a0aa)
  • acot-preset-wcag: add ignore option to interactive-has-name rule (bcf6119)
  • acot-preset-wcag: add ignore option to interactive-supports-focus rule (a563858)
  • acot-preset-wcag: add ignore option to link-has-name rule (97e01a5)
  • utils: add isElementMatches utilify function (53c4c58)

Readme

Source

@acot/acot-runner-storybook

An acot custom runner for Storybook.

The @acot/acot-runner-storybook crawls all the Stories in Storybook and sets them up for acot to audit.

Installation

Install via npm:

$ npm install --save-dev @acot/acot-runner-storybook

Usage

Add @acot/storybook to the runner field of the configuration file.

{ "runner": "@acot/storybook" }

Custom config for each story

You can pass a custom config to the parameters.acot field in Story's metadata, as in the following example:

// Component Story Format (CSF) Example: export default { title: 'Button', component: Button, parameters: { acot: { rules: { '@acot/wcag/button-has-name': 'off', }, }, }, };

Options

include

Type: string[]
Required: false

The Story name pattern to include in the audit target. See the micromatch documentation for pattern strings.

{ "runner": { "uses": "@acot/storybook", "with": { "include": ["*", "/atoms/**/*"] } } }

exclude

Type: string[]
Required: false

The Story name pattern to exclude in the audit target. See the micromatch documentation for pattern strings.

{ "runner": { "uses": "@acot/storybook", "with": { "exclude": ["/utils/**/*"] } } }

timeout

Type: number
Default: 60000
Required: false

Maximum time in milliseconds to wait for the browser instance to collect stories.

{ "runner": { "uses": "@acot/storybook", "with": { "timeout": 120000 } } }

Storybook compatibility

Storybook versions

UI frameworks

Since @acot/acot-runner-storybook doesn't rely on UI frameworks like React, Angular, or Vue.js, it can be used in conjunction with any UI framework of your choice!

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc