eslint-plugin-storybook icon indicating copy to clipboard operation
eslint-plugin-storybook copied to clipboard

Support for the new FlatConfig format

Open AndreaPontrandolfo opened this issue 2 years ago • 17 comments

Any plans to support the new Eslint FlatConfig format, eslint.config.js? In the next major release of Eslint, the new format is gonna be the default and the old format deprecated, so it should be updated.

AndreaPontrandolfo avatar Jul 22 '23 23:07 AndreaPontrandolfo

The most obvious thing that needs to happen is to publish TypeScript typings for the package, so that you can programmatically import and use this ESLint plugin with type safety when your eslint.config.js file is type-checked:

// @ts-check

// Currently `any` :(
// Even worse, it's actually a TypeScript error if `compilerOptions.moduleResolution`
// is configured to `bundler` instead of `nodenext`, about there being no default export.
import eslintPluginStorybook from "eslint-plugin-storybook";

jaydenseric avatar Aug 17 '23 01:08 jaydenseric

Hey there! Thanks for opening this issue.

Are you willing to contribute to make this happen? I'm happy to guide in the process if needed!

yannbf avatar Aug 21 '23 08:08 yannbf

@yannbf I'm interested in helping with this. I don't think it'll be too complicated.

Would the approach be a major version bump and go all in on the change, or do we somehow offer support for both formats and make it opt-in for projects using flag configs?

waldemarfm avatar Aug 23 '23 20:08 waldemarfm

I would love to contribute but i also have my hands-full with OSS projects right now.

AndreaPontrandolfo avatar Aug 23 '23 22:08 AndreaPontrandolfo

Hey @AndreaPontrandolfo @waldemarfm contributions are definitely welcome. If this change can be done in a backwards compatible way, that'd be definitely preferred! If you know what are the steps to support this format, describing those would already be quite helpful as well!

yannbf avatar Oct 08 '23 11:10 yannbf

Some more information: Plugin Migration to Flat Config - ESLint

mheob avatar Jan 26 '24 10:01 mheob