UNPKG

@sketch-hq/sketch-naming-conventions-assistant

Version:

- [Page names](https://github.com/sketch-hq/sketch-assistants/tree/main/assistants/core/src/rules/name-pattern-pages) should start with an emoji, e.g. `🚧 Work in Progress`. - [Artboard names](https://github.com/sketch-hq/sketch-assistants/tree/main/ass

54 lines (53 loc) • 2.65 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const sketch_core_assistant_1 = __importDefault(require("@sketch-hq/sketch-core-assistant")); const assistant = [ sketch_core_assistant_1.default, () => __awaiter(void 0, void 0, void 0, function* () { return { name: '@sketch-hq/sketch-naming-conventions-assistant', rules: [], config: { rules: { '@sketch-hq/sketch-core-assistant/name-pattern-pages': { active: true, forbidden: [], allowed: ['^(?![ a-zA-Z0-9,.-_;!"#$%&/()@Û£><|\\¼»`«]).'], ruleTitle: 'Page names should start with an emoji', }, '@sketch-hq/sketch-core-assistant/name-pattern-artboards': { active: true, forbidden: [], allowed: ['^(\\d+\\.?)+ .*'], ruleTitle: 'Artboard names should start with numbers followed by a space', }, '@sketch-hq/sketch-core-assistant/name-pattern-groups': { active: true, allowed: [], forbidden: ['^Group$', 'Group Copy'], ruleTitle: 'Group names should not be default', }, '@sketch-hq/sketch-core-assistant/name-pattern-symbols': { active: true, allowed: ['(^.+)(([/].*)+)\\w$'], forbidden: [], ruleTitle: 'Symbol names should use forward slash grouping', }, }, }, }; }), ]; exports.default = assistant;