README
sketch-assistant-internal
💁♀️ This Assistant aims to provide a set of usefully configured rules suitable for dogfooding internally at Sketch. Activates and configures rules from the Core Rules Sketch Assistant.
Rules
The following rules are part of this Assistant:
- Artboard Layer Names
- must start with an emojii or be numbered. e.g.
1.1 Splash Screen
- must start with an emojii or be numbered. e.g.
- Artboards Max Ungrouped
- maxUngroupedLayers:
5
- maxUngroupedLayers:
- No Blend Modes In Exported Layers
- No Disabled Borders
- No Disabled Fills
- No Disabled Shadows
- No Disabled Inner Shadows
- No Dirty Layer Styles
- No Dirty Text Styles
- No Empty Groups
- No Hidden Layers
- No Loose Layers
- No Outsized Images
- maxRatio:
2
- maxRatio:
- No Redundant Groups
- No Undersized Images
- minRatio:
1
- minRatio:
- No Unused Shared Styles
- Prefer Shared Layer Styles
- maxIdentical:
1
- maxIdentical:
- Prefer Shared Text Styles
- maxIdentical:
1
- maxIdentical:
- Symbol Layer Names
- names must take advantage of forward-slash grouping, e.g.
Icon/Frog
- names must take advantage of forward-slash grouping, e.g.
- Group Layer Names
- default layer names are forbidden
- Page Names
- must start with an emoji, e.g.
🚧 Work in Progress
- must start with an emoji, e.g.
- Shape Names
- default layer names are forbidden
- Subpixel Positioning
- scaleFactors: only allows 0.5 subpixel increments
For the raw config information check ./config.json
Development
The following section of the readme only relates to developing the Assistant, not using it in your own projects.
Scripts
Interact with the tooling in this repository via the following scripts.
Script | Description |
---|---|
yarn build | Builds the Assistant |
yarn package-tarball | Packages the Assistant as a local file |
Configure rules
Update the configuration for existing rules, or add configuration for a new rule like so:
- Make changes to ./config.json file.
- Make sure to update the Rules section of this readme with an entry
- Add a changeset
- Open a pull request to
master
and request a code review.
Releases
This repository uses Atlassian Changesets to automate the npm release process. Read the docs for more information, but the top-level summary is:
- A GitHub Action maintains a permanently open PR that when merged will publish the package to npm with the latest changes and an automatically determined semver.
- If the work you do in a PR should affect the next release, then you need to commit a "changeset"
to the repository together with the rest of your code changes - do this by running
yarn changeset
. You'll be asked to provide a change type (major, minor or patch) and a message.