Closed christianklotz closed 2 years ago
Working with Assistants it feels redundant to declare a default value with the various option creators such as in:
default
https://github.com/sketch-hq/sketch-assistants/blob/3e354fcf7c7e212bfe6f6dd85bd5c0fc23631d21/packages/types/src/types.ts#L798-L805
They are not used, plus all options are treated as required in the buildRuleOptionSchema API:
buildRuleOptionSchema
https://github.com/sketch-hq/sketch-assistants/blob/3e354fcf7c7e212bfe6f6dd85bd5c0fc23631d21/packages/utils/src/rule-option-schemas/index.ts#L45
Further, the new buildAssistantConfigSchema API derives the default value from the option value provided by an Assistant's configuration.
buildAssistantConfigSchema
I propose to drop the (already optional) defaultValue param in all of the option creators.
defaultValue
Working with Assistants it feels redundant to declare a
default
value with the various option creators such as in:https://github.com/sketch-hq/sketch-assistants/blob/3e354fcf7c7e212bfe6f6dd85bd5c0fc23631d21/packages/types/src/types.ts#L798-L805
They are not used, plus all options are treated as required in the
buildRuleOptionSchema
API:https://github.com/sketch-hq/sketch-assistants/blob/3e354fcf7c7e212bfe6f6dd85bd5c0fc23631d21/packages/utils/src/rule-option-schemas/index.ts#L45
Further, the new
buildAssistantConfigSchema
API derives the default value from the option value provided by an Assistant's configuration.I propose to drop the (already optional)
defaultValue
param in all of the option creators.