UNPKG

@shayanthenerd/eslint-config

Version:

A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style

24 lines (23 loc) 894 B
import path from "node:path"; //#region src/rules/storybook.ts function getStorybookRules(options) { return { "storybook/await-interactions": "error", "storybook/context-in-play-function": "error", "storybook/csf-component": "error", "storybook/default-exports": "error", "storybook/hierarchy-separator": "error", "storybook/meta-inline-properties": "warn", "storybook/meta-satisfies-type": "warn", "storybook/no-redundant-story-name": "warn", "storybook/no-renderer-packages": "error", "storybook/no-stories-of": "error", "storybook/no-uninstalled-addons": ["error", { packageJsonLocation: path.resolve(options.packageDir, "package.json") }], "storybook/prefer-pascal-case": "warn", "storybook/story-exports": "error", "storybook/use-storybook-expect": "error", "storybook/use-storybook-testing-library": "error" }; } //#endregion export { getStorybookRules };