sketch-hq/sketch-assistant-core-rules

Update the `groups-max-layers` rule

HugoDaniel opened this issue · 2 comments

On the groups-max-layers rule:

  1. change the option name from skipClasses to ignore
  2. clarify plural usage (either implement plural support or change the doc/option to specify which names are valid on the array)
  3. report an error when the skipClasses array includes invalid/unsupported class values

Currently the documentation says:

image

  1. I think ignore is too generic, since we may want to use that in future for a more general option. Since only developers will likely look at this rule I think skipClasses is probably ok.
  2. I think the plural usage is just a mistake in the docs
  3. Good idea we might be able to use the new ClassValue enum in the file format ts types to do this validation in the rule

Indeed, I believe we originally started with having it called ignore. Also to avoid confusion with the upcoming ignore mechanism, skipClasses still makes sense. If there'll ever be a more designer facing part to this it could be solved by using a more designer friendly title for this option, e.g. Skip or similar.