javascript icon indicating copy to clipboard operation
javascript copied to clipboard

eslint new config spec support

Open varunkumar opened this issue 2 years ago • 5 comments

What is the correct way to use eslint-config-airbnb in the new config spec?

varunkumar avatar Dec 27 '22 03:12 varunkumar

I'm not sure if there is one yet. l We use 4 eslint plugins, and only 1 of the 4 (perhaps 2) have that support yet, so we couldn't even attempt it until then.

ljharb avatar Dec 27 '22 05:12 ljharb

I have used the FlatCompat class to use the existing config.

varunkumar avatar Dec 29 '22 10:12 varunkumar

@ljharb how would you prefer eslint-config-airbnb to provide support for the new config format - by updating the existing exports to the new format (breaking change, the new format cannot be used from eslintrc config files) or by adding new, separate exports?

mdjermanovic avatar Jul 15 '23 13:07 mdjermanovic

@mdjermanovic definitely not the breaking change. Can it support it yet tho if the dependent plugins don’t?

ljharb avatar Jul 15 '23 16:07 ljharb

@ljharb The import plugin doesn't support it fully, but as far as I understand, including import/parsers in settings on your side as in https://github.com/import-js/eslint-plugin-import/issues/2556#issuecomment-1419518561 would resolve the main issue. import/no-unused-modules doesn't work, see the discussion here https://github.com/import-js/eslint-plugin-import/pull/2829, but it is disabled in airbnb config anyway. Still, waiting until it figures out full support may be better.

alexeyr-ci avatar Dec 01 '23 10:12 alexeyr-ci