加入直播会话:周四,美国东部时间上午 11 点,Storybook 9 版本发布 & 问答环节 (AMA)

HTML验证器

此插件在选项卡视图中提供组件 HTML 中的所有错误和警告

在 Github 上查看

Storybook HTML 验证器插件

此插件在选项卡视图中提供组件 HTML 中的所有 HTML 验证错误和警告,使用 W3C 验证服务

安装

npm i storybook-addon-html-validator-w3c

然后,在 .storybook/main.js 中将其注册为插件。

// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';

const config: StorybookConfig = {
  // ...rest of config
  addons: [
    '@storybook/addon-essentials'
    'storybook-addon-html-validator-w3c', // 👈 register the addon here
  ],
};

export default config;

完成...

在 Storybook 面板插件中检查组件

想请我喝杯咖啡吗??

paypal: gsparihar28 👈 👈 👈 👈 👈 👈


它看起来如何?

gs1

gs2

gs3

gs4

发布

  • npx auto create-labels
  • npm run release (Check for 2FA)