Skip to content

Cleanup options API so that there is no overloading #156

Closed
@romainmenke

Description

@romainmenke

see : #140 (comment)

Some plugins and postcss-preset-env allow option objects in multiple shapes and types for the same key.

  • makes code more complex than it should be
  • makes it hard to debug issues without a full reproduction
  • makes config harder to document

If multiple shapes or types are accepted they must have different keys.

If the options were for sugar/convenience we should pick the shape and type which fully covers the sub feature.

Configs rarely change, so the time saved with sugar by users during config does not weigh up to the time lost when we accidentally break this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions