es-compat icon indicating copy to clipboard operation
es-compat copied to clipboard

Flat config support / ESLint 9

Open brettz9 opened this issue 2 years ago • 4 comments

Hi,

As of ESLint 8, there is now a new format for ESLint config files which requires that plugins follow a specific format. In ESLint 9, this format will be the only one available by default (and other API changes have occurred in ESLint 9 that may affect this plugin).

Info:

  1. https://eslint.org/docs/latest/use/configure/configuration-files-new
  2. https://eslint.org/blog/2022/08/new-config-system-part-1/
  3. https://eslint.org/blog/2022/08/new-config-system-part-2/
  4. https://eslint.org/docs/latest/use/configure/migration-guide

Thanks!

brettz9 avatar Jan 17 '24 19:01 brettz9

Thanks.

Initial rough view of changes required:

  • Update https://github.com/robatwilliams/es-compat/blob/master/packages/check-es-compat/bin/cli.mjs to flat config and check impacts of migration guide
  • Deal with changes from migration guide (inc. section on breaking changes for plugin developers e.g. RuleTester) and https://eslint.org/blog/category/release-notes/ (nothing looks concerning)
  • Update project itself and example project to be linted by ESLint 9

Impact:

  • check-es-compat CLI tool users don't care what ESLint version it uses
  • Plugin can probably remain compatible with both ESLint 8 and 9

Would be good to remain under test for both v8 and v9 for a while, unless not it's too much work.

robatwilliams avatar Jan 18 '24 09:01 robatwilliams

The plugin also throws an error if used with FlatConfig compatibility helpers. Even if it doesn't natively support FlatConfig, it would great to fix that in the interim.

benasher44 avatar Apr 22 '24 14:04 benasher44

I'm afraid I have barely any time spare for this project at the moment, and neither am I using this nor ESLint 9.

I see 9 was released 3 weeks ago although of course ideally I would have tested against the beta. But now more and more people will be upgrading.

If someone could post some detail about the problem with the compatibility helpers, it might help me judge whether it's something I could spot-fix when I have half an hour spare.

robatwilliams avatar Apr 23 '24 15:04 robatwilliams

Actually I take it back. I can't reproduce the crash anymore. If I see it again, I'll come back with a reproduction. Apologies!

benasher44 avatar Apr 28 '24 02:04 benasher44