@grailwind/eslint-plugin 0.1.0-beta.2 → 0.1.0-beta.4

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
@@ -13,7 +13,7 @@ npm install --save-dev @grailwind/eslint-plugin@beta
13
13
  ```
14
14
 
15
15
  It reads the tinctures, ordinaries and charges from your installed `grailwind`, so it needs
16
- `grailwind` 0.6.x. For typos and other class errors, see
16
+ `grailwind` 0.8.x. For typos and other class errors, see
17
17
  [Linting](https://github.com/pafirmin/grailwind#linting) in the Grailwind README.
18
18
 
19
19
  ## Setup
@@ -57,7 +57,7 @@ export default [
57
57
  No metal (`or`, `argent`) on metal, and no colour on colour.
58
58
 
59
59
  - An ordinary, chief or bordure is checked against the field on the same element:
60
- `escutcheon or fess-argent` is metal on metal. So are engrailed, invected and voided ones
60
+ `escutcheon or fess-argent` is metal on metal. So are engrailed, invected, wavy, indented, embattled and voided ones
61
61
  (`fess-engrailed-argent`, `cross-voided-argent`).
62
62
  - A fimbriated ordinary is checked against its fimbriation, and the fimbriation against the
63
63
  field: `or chevron-sable fimbriated-argent` is metal on metal (Argent on Or).
@@ -104,7 +104,8 @@ one, other than a chief, they have nowhere to go.
104
104
  An element draws one ordinary plus, optionally, a chief. With two, such as
105
105
  `fess-azure chevron-gules`, only one shows. Two chiefs are flagged too. A `charges` container
106
106
  takes one arrangement: `between`, `on`, `in-pale`, `in-fess`, `in-bend` or `in-bend-sinister`.
107
- Counterchanged, engrailed, invected, voided and fur ordinaries count as ordinaries.
107
+ Counterchanged, engrailed, invected, wavy, indented, embattled, voided and fur ordinaries count as
108
+ ordinaries.
108
109
 
109
110
  A charge at a named point (`in-dexter-chief` and so on) is a separate group in the blazon, so it
110
111
  goes in its own `charges` container. Among other charges, it still counts towards their number
@@ -119,8 +120,8 @@ Modifiers that would otherwise do nothing:
119
120
  element, e.g. `per-pale-argent-gules`.
120
121
  - `counterchanged` on `charges`, or on a charge, needs a divided field on the shield that holds
121
122
  the container.
122
- - `fimbriated-*` needs a plain tinctured ordinary. A chief, and an engrailed, invected, voided,
123
- fur or counterchanged ordinary, aren't fimbriated.
123
+ - `fimbriated-*` needs a plain tinctured ordinary. A chief, and an engrailed, invected, wavy,
124
+ indented, embattled, voided, fur or counterchanged ordinary, aren't fimbriated.
124
125
  - `counterchanged` doesn't work on a charge with a transform (`rotate-*`, `scale-*`, `skew-*`,
125
126
  `translate-*`): the charge shows its own small copy of the field instead.
126
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grailwind/eslint-plugin",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "ESLint rules for Grailwind heraldry markup: the rule of tincture and charge structure",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -26,7 +26,7 @@
26
26
  "peerDependencies": {
27
27
  "@html-eslint/parser": "*",
28
28
  "eslint": "^9.0.0 || ^10.0.0",
29
- "grailwind": "^0.6.0"
29
+ "grailwind": "^0.8.0"
30
30
  },
31
31
  "peerDependenciesMeta": {
32
32
  "@html-eslint/parser": {
package/src/blazon.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  DIVISIONS,
10
10
  FURS,
11
11
  LINES,
12
+ lineOrdinaries,
12
13
  METALS,
13
14
  OF_THE_FIRST,
14
15
  ORDINARIES,
@@ -38,7 +39,7 @@ for (const ordinary of ORDINARIES) {
38
39
  for (const tincture of PAINT) {
39
40
  const fur = FUR.has(tincture);
40
41
  ORDINARY_CLASSES.set(`${ordinary}-${tincture}`, { ordinary, tincture, fur });
41
- for (const line of LINES) {
42
+ for (const line of LINES.filter((l) => lineOrdinaries(l).includes(ordinary))) {
42
43
  ORDINARY_CLASSES.set(`${ordinary}-${line}-${tincture}`, { ordinary, tincture, fur, line });
43
44
  }
44
45
  }
@@ -15,7 +15,7 @@ export default {
15
15
  messages: {
16
16
  noDivision: "`{{cls}}` needs a divided field to swap, e.g. `per-pale-argent-gules`",
17
17
  noOrdinary:
18
- "`{{cls}}` needs a plain tinctured ordinary to edge: a chief, and an engrailed, invected, fur or counterchanged ordinary, aren't fimbriated",
18
+ "`{{cls}}` needs a plain tinctured ordinary to edge: a chief, and an engrailed, invected, wavy, indented, embattled, fur or counterchanged ordinary, aren't fimbriated",
19
19
  transformed:
20
20
  "`{{cls}}` breaks `counterchanged`: a transformed charge shows its own small copy of the field",
21
21
  },