Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support new config system #210

Closed
wants to merge 9 commits into from

Conversation

jjangga0214
Copy link

@jjangga0214 jjangga0214 commented Sep 10, 2022

Supporting eslint's new config system of eslint.

The legacy config system always has require()d plugins and sharable configs, while the new system is available in both ESM and CJS.

Therefore conditional export is great to keep compatibility while introducing the new config.

plugin: protocol(e.g. plugin:markdown/recommended) is not valid any more. In the new config system, a bi-directional dependency between a plugin object and a preset config object is detached. From now on, only a config object should depend on a plugin object, not vice-versa. Thus, the new plugin (a new entry point index.js) doesn't have configs property, following the spec, though having the property does not mean incompatibility.

Users should have a way to import shareable config independently.
Hence eslint-plugin-markdown/recommended is introduced as a new entry point for it.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 10, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@jjangga0214
Copy link
Author

I also wrote README. And I've taken care to make sure this PR is not a breaking change.

@jjangga0214
Copy link
Author

@nzakas May I ping?
I want to get feedback from you about the design in this PR, as I also want to apply similar changes to other plugins.

Copy link
Member

@kecrily kecrily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a unit test for new config system?

@jjangga0214
Copy link
Author

@kecrily Maybe later?
Or I expect whoever is available can do that before I do.

@nzakas
Copy link
Member

nzakas commented Mar 4, 2024

Superseded by #232

@nzakas nzakas closed this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants