@heyramzi/lint 2.11.3 → 2.11.5

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.
@@ -1,4 +1,12 @@
1
1
  /** Patterns for spelled-out numbers, numbered labels and comma-run lists. */
2
+
3
+ /** Each cardinal in lowercase or capitalised, never all caps, so the pattern can stay case-sensitive. */
4
+ const CARDINALS =
5
+ "two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty thirty forty fifty sixty seventy eighty ninety hundred thousand million"
6
+ .split(" ")
7
+ .map((word) => `[${word[0]}${word[0].toUpperCase()}]${word.slice(1)}`)
8
+ .join("|");
9
+
2
10
  export const patternsNumbersAndRuns = [
3
11
  {
4
12
  id: "spelled-out-quantity",
@@ -25,7 +33,12 @@ export const patternsNumbersAndRuns = [
25
33
 
26
34
  // A relative pronoun or `of` after the cardinal means it counts no noun ("the one or two that carry weight"), 15 Oct 2026.
27
35
  // A letter lookbehind, not `\b`, because `\b` is ASCII and read the ß in "größten" as an edge (28 Oct 2026).
28
- test: /(?<!\d[\s-])(?<![\p{L}\p{N}_])(?:two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|thousand|million)[\s-]+(?!(?:Sigma|Factor|way|that|which|who|whom|whose|of)\b)[a-z]{3,}/iu,
36
+
37
+ // The counted word must start lowercase: "Four Score Solutions" is a company name, and the gate held a cold email for it (11 Nov 2026).
38
+ test: new RegExp(
39
+ `(?<!\\d[\\s-])(?<![\\p{L}\\p{N}_])(?:${CARDINALS})[\\s-]+(?!(?:way|that|which|who|whom|whose|of)\\b)[a-z]{3,}`,
40
+ "u",
41
+ ),
29
42
  rule: "A quantity written as words. A digit is the one shape in a line of prose the eye cannot skim, so every count, duration, price and measure ships as digits: 40 pages, 19 minutes, 3 channels, 20%. See the `spelled-out-number` shape for the exceptions.",
30
43
  example:
31
44
  '"forty pages" / "nineteen minutes beat twenty-nine" / "twenty per cent of the pipeline"',
@@ -175,4 +175,8 @@ export const wordsEn = [
175
175
  "underpins",
176
176
  "valuable",
177
177
  "vibrant",
178
+ // --- Stock demo companies: every AI demo reaches for them (Ramzi, 12 Nov 2026) ---
179
+ "northwind",
180
+ "contoso",
181
+ "fabrikam",
178
182
  ];
package/jev.js CHANGED
@@ -41,10 +41,12 @@ function passFields() {
41
41
  { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 30_000 },
42
42
  ),
43
43
  );
44
+ // pass-cli files fields added after the item's creation under `extra_fields`, not a section.
44
45
  passed = Object.fromEntries(
45
- item.content.content.Custom.sections
46
- .flatMap((section) => section.section_fields)
47
- .map((field) => [field.name, String(Object.values(field.content)[0] ?? "")]),
46
+ [
47
+ ...item.content.content.Custom.sections.flatMap((section) => section.section_fields),
48
+ ...(item.content.extra_fields ?? []),
49
+ ].map((field) => [field.name, String(Object.values(field.content)[0] ?? "")]),
48
50
  );
49
51
  } catch {
50
52
  passed = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyramzi/lint",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
4
4
  "description": "Shared oxlint rules, base config and gates for Studio projects",
5
5
  "license": "MIT",
6
6
  "repository": {