eslint-doc-generator icon indicating copy to clipboard operation
eslint-doc-generator copied to clipboard

Support ESLint flat config

Open bmish opened this issue 1 year ago • 1 comments

Need to investigate how close we can support plugins that export flat configs.

How can we detect flat configs exported by a plugin so we can determine which rules are part of which configs?

https://eslint.org/blog/2022/08/new-config-system-part-2/

bmish avatar Dec 28 '22 03:12 bmish

Per https://github.com/eslint/eslint/issues/18095#issuecomment-1951414598, ideally plugins would continue to use the exported configs object to contain all their configs, both legacy and flat (temporarily using flat/ prefixes for flat configs before moving to -legacy suffixes for legacy configs). I'm not sure there's much we can or should do to detect flat configs that some plugins are exporting with string exports like eslint-plugin-example/configs/recommended. Plugins should eventually consolidate those back into the configs object.

We can update our README with documentation about this.

There's also a possibility that, using the configs object, we could detect the flat/legacy versions of the same config, and add some smart behavior to distinguish them.

bmish avatar Feb 19 '24 15:02 bmish