Skip to content

Rename prop style as it is a reserved word #157

@d-koppenhagen

Description

@d-koppenhagen

Is your feature request related to a problem? Please describe.

Some components are using the property style which shouldn't be used as it's a reserved keyword.
Running ESLint with eslint-plugin-vue show the affected components:

/Users/dannykoppenhagen/dev/vue3-openlayers/src/components/interaction/ClusterSelectInteraction.vue
  71:5  error  'style' is a reserved attribute and cannot be used as props  vue/no-reserved-props

/Users/dannykoppenhagen/dev/vue3-openlayers/src/components/layers/VectorLayer.vue
  52:5  error  'style' is a reserved attribute and cannot be used as props  vue/no-reserved-props

/Users/dannykoppenhagen/dev/vue3-openlayers/src/components/layers/WebglPointsLayer.vue
  40:5  error  'style' is a reserved attribute and cannot be used as props  vue/no-reserved-props

/Users/dannykoppenhagen/dev/vue3-openlayers/src/components/sources/SourceWMTS.vue
  140:5  error  'style' is a reserved attribute and cannot be used as props  vue/no-reserved-props

Describe the solution you'd like
The property of each of the affected components should be renamed to e. g. sytles.

  • styles does conflict with the reseved keyword style for an HTML Element.
  • styles can typically be either a Style, an Style[] or a StyleFunction

Describe alternatives you've considered

Additional context
The implementation of this rule showing the reserved keywords can be found here

This will be a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions