@multiplatform.one/config 7.66.0 → 7.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -162,9 +162,49 @@ MPO-ONLY-REUSE), with the MPO component to use. So is a card painted in place:
162
162
  a fill plus a radius, border or shadow around inset content. Composing the MPO
163
163
  role passes. A stopgap declares `// mpo-role-escape: <reason>` above it.
164
164
 
165
+ The rules harvested from SHC (FZ-8025, FZ-8033) travel with the lint so every
166
+ MPO app gets them (LC-192):
167
+
168
+ - UI copy (JSX text, copy attributes and keys such as `label`, `title` and
169
+ `placeholder`, `t()` keys and `defaultValue`, and every value in a string
170
+ catalog under `i18n/`, `locales/` or `localizations/`, JSON included) is
171
+ sentence case (`copy-title-case`), never hedges a plural with "(s)"
172
+ (`copy-plural`), writes "and" for "&" (`copy-ampersand`) and carries no em
173
+ dash except the lone placeholder "—" (`copy-em-dash`, all LC-202).
174
+ - `user-words` (LC-203) rejects implementation words in UI copy. The house list
175
+ is `houseBannedWords`; a baseline's `bannedWords` replaces it for that app,
176
+ and its `properNames` lists the names `copy-title-case` leaves alone.
177
+ - `error-copy` (LC-204) rejects error copy (a key or catalog path naming an
178
+ error or failure) that leads with a number, a code or an identifier.
179
+ - `refresh-label` (LC-216) and `zoom-button` (LC-217) reject a standing
180
+ Refresh or Reload control and zoom-in/out buttons; `zoom-lock` (LC-196)
181
+ rejects a viewport, in source or an `.html` page, that disables pinch zoom.
182
+ - `web-paint` (LC-206) rejects paint React Native can't draw: `mixBlendMode`,
183
+ `clipPath`, `textShadow*`, `backdropFilter`, masks, CSS `filter` functions
184
+ and the same properties in CSS text. SVG artwork keeps its `clipPath`. The
185
+ MPO `Material` component is the one file allowed a backdrop blur.
186
+ - `action-word` (LC-260 ICONS-OVER-WORDS) rejects a button or pressable whose
187
+ whole visible label (children, `label`, `title`, `Button.Text`, a `t()`
188
+ default or the last segment of its key) is a standard action word: Add,
189
+ Remove, Replace, Delete, Edit, Save, Cancel, Close, Done, Share, Search,
190
+ Filter, Sort, Upload, Download, Copy, Refresh, Settings, More, Back, Next,
191
+ Send, Export or Import. Draw the icon and put the word in the accessibility
192
+ label. Only a form's submit (`type="submit"` or inside `Form.Trigger`) and a
193
+ destructive confirm (Delete or Remove in a Danger section, confirm alert or
194
+ destructive action, or carrying a destructive `intent`) stay words.
195
+ - `art-tint` (LC-207) rejects `tintColor` on an image whose source isn't a
196
+ glyph (a source naming an icon, glyph or symbol).
197
+ - `link-chrome` (LC-181) rejects `color`, `fontWeight` and text decoration set
198
+ on an `Anchor`, `Link` or `a`, directly or in a style.
199
+ - `api-vocabulary` (LC-180) checks exported `*Props` types: `density`, `scale`
200
+ and a string-valued `level` are `size`; `enabled` is `disabled`; `isOpen`,
201
+ `opened` and `isVisible` are the `open` triad; a hue-valued enum or a
202
+ `variant` carrying a semantic colour is `intent`, `severity` or `tone`; a
203
+ negative boolean (`noX`, `hideX`, `disableX`) is named positively.
204
+
165
205
  Every violation is tagged with its rule: `field-action`, `field-focus`, `hex`,
166
- `geometry`, `inline-spacing`, `mpo-role`, `raw-control`, `styled-mpo` or
167
- `token-file`.
206
+ `geometry`, `inline-spacing`, `mpo-role`, `raw-control`, `styled-mpo`,
207
+ `token-file` or one of the harvested rules above (`harvestRules`).
168
208
 
169
209
  #### Ratchet
170
210
 
@@ -181,15 +221,22 @@ run rewrites the baseline down and exits 0; commit it. `--frozen` fails that
181
221
  case instead, so CI catches a lowered count nobody committed. `--list` prints
182
222
  the violations on a passing run. `--baseline` may repeat; MPO's `pnpm
183
223
  lint:design` ratchets `apps/one`, `apps/storybook-expo`, `features`,
184
- `packages`, `public/backoffice` and `public/frappe-ui` this way.
185
-
186
- `mpo-role` is also recorded by offender (file and component), so a new fork
187
- fails even when another was fixed in the same change, and line moves don't
188
- count. `--only <rule>` (repeatable) cuts a baseline that ratchets just those
189
- rules. `--init` on an existing baseline adopts the rules it doesn't record yet,
224
+ `packages`, `public/backoffice`, `public/frappe-ui` and `public` (the harvested
225
+ rules over every MPO package) this way.
226
+
227
+ `mpo-role` and the harvested rules are also recorded by offender (file and
228
+ component, or file and string), so a new offender fails even when another was
229
+ fixed in the same change, and line moves don't count. `--only <rule>`
230
+ (repeatable) cuts a baseline that ratchets just those rules; `--only harvest`
231
+ takes all the harvested rules. `--init` on an existing baseline adopts the rules it doesn't record yet,
190
232
  such as `mpo-role` in a baseline cut before it shipped, and leaves the recorded
191
233
  ceilings alone.
192
234
 
235
+ `mpo-design-lint --verify-ci [dir]` is LC-192's fitness check: it fails when
236
+ the repo's `.gitlab-ci.yml` or GitHub workflows never run the lint, run it
237
+ without `--frozen`, or skip a committed `design-baseline.json`. It follows a CI
238
+ line into `package.json` scripts and `Makefile` recipes.
239
+
193
240
  The implementation is also exported from `@multiplatform.one/config/design-lint`
194
241
  as `inspectDesign(source, filename)`, `designFiles(path)` and `runDesignLint(paths)`.
195
242
  It derives from Pelt's `db7ce75c` guard. TypeScript ships as a runtime dependency.