Closed Belco90 closed 5 days ago
@MichaelDeBoey @G-Rath I forgot about this one. For me, it's a must before releasing the next major. Thoughts?
Personally I don't think it should be considered critical for this major as it's much of a muchness: the presences of the flat
in the name isn't going to stop or slow down migration of flat config, and shouldn't add any maintenance burden because either way you're going to be dealing with two sets of configs (arguably, it's slighter better because "flat" is shorter than "legacy" 😅)
The downside is it's one more thing people have to deal with in upgrading to this new major, but the same argument applies there too: it's a very small change to be just removing four letters and a slash, which'll have to be done at some point 🤷
Either way a new major is going to have to happen someday if you want to remove the legacy configs at all
Having read @G-Rath, I agree that it would probably be better to keep it as-is and just remove legacy configs in a next major release (when ESLint v10 is released)
Fair enough, let's leave the current config formats and leave the change for a future major.
In v6 of this plugin, the default configs exported are the eslintrc format ones, having the flat ones prefixed with
flat/
. For example, for enabling the recommended React preset, you can set it up:plugin:testing-library/react
in eslintrc format'flat/react'
in flat formatSince flat config is the default format in ESLint v9, we should switch the default exported configs in this rule, so the flat are the default ones, and the eslintrc are prefixed/suffixed. This is recommended by ESLint:
Based on this, we would expose flat configs with the regular name (removing the current
flat/
prefix), then adding a-legacy
suffix to the eslintrc format. The previous example for the React preset would look like this:plugin:testing-library/react-legacy
in eslintrc format'react'
in flat formatThis will be a breaking change, so it must be added to the migration guide.