Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

ESM is unsupported #160

@indietyp

Description

@indietyp

Describe the bug

I am trying to use flat configs through the use of #156; my problem right now is that I cannot use it in my configuration, as my eslint configuration is in an ESM library.
The problem that I am facing is that all files in configs/ aren't transpiled and make use of require, which is not supported in ESM. Tools like tsup can shim these (kind of), but it makes the bundling a lot harder, as now multiple other - not directly referenced - files need to be included during bundling.

Expected behavior

Use of eslint-config-storybook in ESM packages.

Screenshots

ESLint: 8.57.0

TypeError: __require.resolve is not a function
    at ../../../node_modules/eslint-plugin-storybook/dist/configs/csf-strict.js

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions