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

Throw on preset w/ neither settings nor plugins #200

Closed
4 tasks done
wooorm opened this issue Sep 24, 2022 · 1 comment · Fixed by #202
Closed
4 tasks done

Throw on preset w/ neither settings nor plugins #200

wooorm opened this issue Sep 24, 2022 · 1 comment · Fixed by #202
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧑 semver/major This is a change 🦋 type/enhancement This is great to have

Comments

@wooorm
Copy link
Member

wooorm commented Sep 24, 2022

Initial checklist

Problem

mdx-js/mdx#2136

Solution

Throw here when neither plugins nor settings is defined.

Alternatives

Keep as is.

I don’t imagine most folks want empty presets being silently ignored.

For unified-engine, we treat config files as presets as well (though importing plugins-as-string). There might be a tiny use case there for empty config files, as they could “restore-to-defaults” a folder, if a higher folder has a config file that prescribes complex things.
This would break that use case.
But I dunno, I don’t think people actually do this?

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 24, 2022
@wooorm wooorm added 🦋 type/enhancement This is great to have 🧑 semver/major This is a change 🗄 area/interface This affects the public interface 👍 phase/yes Post is accepted and can be worked on and removed 🤞 phase/open Post is being triaged manually labels Sep 24, 2022
@github-actions

This comment has been minimized.

@wooorm wooorm changed the title Throw on preset w/ neither settings nor plugins Throw on preset w/ neither settings nor plugins Sep 24, 2022
wooorm added a commit that referenced this issue Oct 12, 2022
Empty presets are most likely a mistake by the user.
At best, they do nothing.
This improves the situation for humans that make mistakes,
by throwing a useful error.

Closes GH-200.
wooorm added a commit that referenced this issue Aug 9, 2023
Empty presets are most likely a mistake by the user. At best, they do nothing.
This improves the situation for humans that make mistakes, by throwing a useful error.

Closes GH-200.
Closes GH-202.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Remco Haszing <remcohaszing@gmail.com>
Reviewed-by: JounQin <admin@1stg.me>
@wooorm wooorm added the 💪 phase/solved Post is done label Aug 9, 2023
@github-actions github-actions bot removed the 👍 phase/yes Post is accepted and can be worked on label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧑 semver/major This is a change 🦋 type/enhancement This is great to have
Development

Successfully merging a pull request may close this issue.

1 participant