@markuplint/rules 3.11.0 → 3.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/rules",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Built-in rules of markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -20,19 +20,19 @@
20
20
  "./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
21
21
  },
22
22
  "dependencies": {
23
- "@markuplint/html-spec": "3.10.0",
24
- "@markuplint/ml-core": "3.11.0",
25
- "@markuplint/ml-spec": "3.10.0",
26
- "@markuplint/selector": "3.10.0",
27
- "@markuplint/shared": "3.7.0",
28
- "@markuplint/types": "3.8.0",
23
+ "@markuplint/html-spec": "3.11.0",
24
+ "@markuplint/ml-core": "3.12.0",
25
+ "@markuplint/ml-spec": "3.11.0",
26
+ "@markuplint/selector": "3.11.0",
27
+ "@markuplint/shared": "3.8.0",
28
+ "@markuplint/types": "3.9.0",
29
29
  "@types/debug": "^4.1.8",
30
30
  "@ungap/structured-clone": "^1.2.0",
31
31
  "ansi-colors": "^4.1.3",
32
32
  "chrono-node": "^2.6.3",
33
33
  "debug": "^4.3.4",
34
- "tslib": "^2.5.3",
35
- "type-fest": "^3.11.1"
34
+ "tslib": "^2.6.0",
35
+ "type-fest": "^3.12.0"
36
36
  },
37
- "gitHead": "9547b8dca20736a93e4d01af2d61bee314ba5718"
37
+ "gitHead": "4ab20276db48a6acb29a923ea8666890ca853442"
38
38
  }
@@ -1629,4 +1629,13 @@ ol(itemscope itemtype="https://schema.org/BreadcrumbList")
1629
1629
  ).violations,
1630
1630
  ).toStrictEqual([]);
1631
1631
  });
1632
+
1633
+ test('#1078', async () => {
1634
+ expect(
1635
+ (await mlRuleTest(rule, '<script src="foo.js" referrerpolicy="no-referrer"></script>')).violations,
1636
+ ).toStrictEqual([]);
1637
+ expect(
1638
+ (await mlRuleTest(rule, '<img src="foo.png" referrerpolicy="no-referrer"></img>')).violations,
1639
+ ).toStrictEqual([]);
1640
+ });
1632
1641
  });
@@ -392,22 +392,7 @@ describe('Issues', () => {
392
392
  test('#592', async () => {
393
393
  expect(
394
394
  (await mlRuleTest(rule, '<svg aria-label="i-have-name"><path /><rect><path /></rect></svg>')).violations,
395
- ).toStrictEqual([
396
- {
397
- col: 31,
398
- line: 1,
399
- message: 'Require accessible name',
400
- raw: '<path />',
401
- severity: 'error',
402
- },
403
- {
404
- col: 39,
405
- line: 1,
406
- message: 'Require accessible name',
407
- raw: '<rect>',
408
- severity: 'error',
409
- },
410
- ]);
395
+ ).toStrictEqual([]);
411
396
  expect(
412
397
  (await mlRuleTest(rule, '<svg role="img" aria-label="i-have-name"><path /><rect><path /></rect></svg>'))
413
398
  .violations,
@@ -419,15 +404,7 @@ describe('Issues', () => {
419
404
  '<svg aria-label="i-have-name"><path aria-label="i-have-name" /><rect><path /></rect></svg>',
420
405
  )
421
406
  ).violations,
422
- ).toStrictEqual([
423
- {
424
- col: 64,
425
- line: 1,
426
- message: 'Require accessible name',
427
- raw: '<rect>',
428
- severity: 'error',
429
- },
430
- ]);
407
+ ).toStrictEqual([]);
431
408
  expect(
432
409
  (
433
410
  await mlRuleTest(
@@ -1170,4 +1170,34 @@ describe('Issues', () => {
1170
1170
  },
1171
1171
  ]);
1172
1172
  });
1173
+
1174
+ test('#1084', async () => {
1175
+ const { violations } = await mlRuleTest(
1176
+ rule,
1177
+ `
1178
+ <select multiple aria-label="some label text">
1179
+ <option>foo</option>
1180
+ <option>bar</option>
1181
+ </select>
1182
+
1183
+ <select aria-label="some label text">
1184
+ <option>foo</option>
1185
+ <option>bar</option>
1186
+ </select>
1187
+
1188
+ <select aria-label="some label text">
1189
+ <option>foo</option>
1190
+ <optgroup label="group">
1191
+ <option>bar</option>
1192
+ </optgroup>
1193
+ </select>
1194
+
1195
+ <datalist>
1196
+ <option>foo</option>
1197
+ <option>bar</option>
1198
+ </datalist>
1199
+ `,
1200
+ );
1201
+ expect(violations).toStrictEqual([]);
1202
+ });
1173
1203
  });