SrBrahma / eslint-config-biome

Disables ESLint rules that have a recommended and equivalent Biome rule
Other
86 stars 1 forks source link

Include eslint-config-prettier in this lib #2

Closed SrBrahma closed 3 months ago

SrBrahma commented 8 months ago

To disable prettier-like rules and to remove this README section

image

, create an automated way to copy the eslint-config-prettier .js file (under MIT license) into this repo, together with a starting comment like:

/*!
 * eslint-config-prettier © 2017-2023 Simon Lydell and contributors
 * https://github.com/prettier/eslint-config-prettier
 *
 * This code is licensed under the MIT License (MIT).
 */

With eslint flat config we could just have it as a dep, but most aren't using it yet. Also, without the flat config, the solution would be to require users to use the rushstack patch, but it wouldn't be user-friendly to have this requirement.

Also, having to install and setup the eslint-config-prettier as an extra step is bad. This can be a plug-and-play solution this way.

giacomorebonato commented 3 months ago

This is breaking the usage with eslint flat config:

A config object is using the "extends" key, which is not supported in flat config system. Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array. Please see the following page for more information: https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs

SrBrahma commented 3 months ago

I am still not familiar with the flat config; I haven't migrated to it yet.

If I use the flat config in this lib, I believe older eslint versions wouldn't support its usage?

Let me know if you have thoughts about it.

giacomorebonato commented 3 months ago

I am having issues with flat config I admit... but it's somehow forced to be used in latest eslint major version.

I need to try these "compatibility utilities" that will hopefully solve the issues: https://eslint.org/blog/2024/05/eslint-compatibility-utilities/

SrBrahma commented 3 months ago

Please let me know if I can do something about your issue.