-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
featureIncludes new featuresIncludes new features🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing
Description
Clear and concise description of the problem
As you can see in the screenshot below of the code snippets, source, when a multi-word is used as an option, the only way to get the values from the context is using []
square notation.
Suggested solution
Though we could do something like this, const listArchive = ctx.values["list-archived"]
which is type-safe and also autocompletes on tabs.
But it would be nice to have a flag within define({enableCamelCasing: true})
which could convert kebab-case
into camelCase
automatically for easier access and even could be de-structured right from context.values like,
// Instead of
const listArchived = ctx.values["list-archived"];
// OR
const {"list-archived": listArchived} = ctx.values;
// This 🔽
const {listArchived} = ctx.values;
Alternative
Also, it would be nice to support dotted options down the line.
Additional context
No response
Validations
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
theoephraim
Metadata
Metadata
Assignees
Labels
featureIncludes new featuresIncludes new features🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressingPriority 2: nothing is broken but it's worth addressing