prismicio / slice-machine

A series of tools for developing and deploying website sections with Prismic
https://prismic.io/docs
Apache License 2.0
287 stars 53 forks source link

We can still create a slice that starts with a number but that creates error afterwards #599

Closed chamois-d-or closed 1 year ago

chamois-d-or commented 2 years ago

Javascript constant names cannot start with numbers. This creates an issue when slice are created with their name starting with a number.

Versions

Steps to reproduce

Create a slice starting with a number, e.g. 2Columns

What is expected?

UI should not let users create such slices.

What is actually happening?

UI lets you do so.

mdeclercq commented 1 year ago

This issue has been fixed for the Slice creation but a similar issue can happen when renaming a slice. See https://github.com/prismicio/slice-machine/issues/791