eslint-plugin-readable-tailwind icon indicating copy to clipboard operation
eslint-plugin-readable-tailwind copied to clipboard

feat: add flat config presets

Open joshuajaco opened this issue 5 months ago • 2 comments

Fixes https://github.com/schoero/eslint-plugin-better-tailwindcss/issues/148

joshuajaco avatar Jul 05 '25 22:07 joshuajaco

ESLint docs suggest to not go for "flat/recommended" or flat.recommended. Instead, it is advised to prefix rc configs with legacy-* and reserve 'plain' object keys for the new configs. This is a breaking change, yes.

Context (similar problem in eslint-plugin-react-hooks):

  • Official docs: https://eslint.org/docs/latest/extend/plugin-migration-flat-config#backwards-compatibility
  • https://github.com/facebook/react/pull/34994
  • POV of ESLint maintainer: https://github.com/eslint/eslint/issues/18095#issuecomment-1952981425

Given that this PR has not been merged yet, might be worth one-shoting the naming in eslint-plugin-better-tailwindcss@4. Just deleting rc configs and supporting Flat configs only would not be a bad move too, given that ESLint v10 is coming. This will allow dropping CommonJS.

I've been using 4.0.0-beta.3 in a few projects and it works like a charm!

kachkaev avatar Nov 11 '25 13:11 kachkaev

If there is a major release planned, I'd agree with @kachkaev that flat config should be the default

joshuajaco avatar Nov 11 '25 18:11 joshuajaco