eslint-plugin-baseline-js 0.7.2 → 0.7.3

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
@@ -196,3 +196,6 @@ MIT
196
196
  [jsdocs-href]: https://www.jsdocs.io/package/eslint-plugin-baseline-js
197
197
  [license-src]: https://img.shields.io/github/license/3ru/eslint-plugin-baseline-js.svg?style=flat&colorA=080f12&colorB=1ea446
198
198
  [license-href]: https://github.com/3ru/eslint-plugin-baseline-js/blob/main/LICENSE
199
+
200
+ ---
201
+ <sub>Thanks to Anthropic for sponsoring</sub>
package/dist/index.mjs CHANGED
@@ -13857,18 +13857,6 @@ const descriptors$1 = [
13857
13857
  "iface": "Element",
13858
13858
  "prop": "prependHTMLUnsafe"
13859
13859
  },
13860
- {
13861
- "featureId": "html-setters",
13862
- "kind": "instanceMember",
13863
- "iface": "Element",
13864
- "prop": "replaceHTML"
13865
- },
13866
- {
13867
- "featureId": "html-setters",
13868
- "kind": "instanceMember",
13869
- "iface": "Element",
13870
- "prop": "replaceHTMLUnsafe"
13871
- },
13872
13860
  {
13873
13861
  "featureId": "html-setters",
13874
13862
  "kind": "instanceMember",
@@ -13970,6 +13958,12 @@ const descriptors$1 = [
13970
13958
  "iface": "TrustedHTMLParserOptions",
13971
13959
  "prop": "sanitizer"
13972
13960
  },
13961
+ {
13962
+ "featureId": "html-streaming-setters",
13963
+ "kind": "instanceMember",
13964
+ "iface": "Blob",
13965
+ "prop": "textStream"
13966
+ },
13973
13967
  {
13974
13968
  "featureId": "html-streaming-setters",
13975
13969
  "kind": "instanceMember",
@@ -14106,25 +14100,25 @@ const descriptors$1 = [
14106
14100
  "featureId": "html-streaming-setters",
14107
14101
  "kind": "instanceMember",
14108
14102
  "iface": "Element",
14109
- "prop": "streamReplaceHTML"
14103
+ "prop": "streamReplaceWithHTML"
14110
14104
  },
14111
14105
  {
14112
14106
  "featureId": "html-streaming-setters",
14113
14107
  "kind": "instanceMember",
14114
14108
  "iface": "Element",
14115
- "prop": "streamReplaceHTMLUnsafe"
14109
+ "prop": "streamReplaceWithHTMLUnsafe"
14116
14110
  },
14117
14111
  {
14118
14112
  "featureId": "html-streaming-setters",
14119
14113
  "kind": "instanceMember",
14120
- "iface": "Element",
14121
- "prop": "streamReplaceWithHTML"
14114
+ "iface": "Request",
14115
+ "prop": "textStream"
14122
14116
  },
14123
14117
  {
14124
14118
  "featureId": "html-streaming-setters",
14125
14119
  "kind": "instanceMember",
14126
- "iface": "Element",
14127
- "prop": "streamReplaceWithHTMLUnsafe"
14120
+ "iface": "Response",
14121
+ "prop": "textStream"
14128
14122
  },
14129
14123
  {
14130
14124
  "featureId": "html-streaming-setters",
@@ -49210,6 +49204,12 @@ const descriptors = [
49210
49204
  "base": "Error",
49211
49205
  "prop": "isError"
49212
49206
  },
49207
+ {
49208
+ "featureId": "iterator-join",
49209
+ "kind": "instanceMember",
49210
+ "iface": "Iterator",
49211
+ "prop": "join"
49212
+ },
49213
49213
  {
49214
49214
  "featureId": "iterator-methods",
49215
49215
  "kind": "instanceMember",
@@ -50512,6 +50512,18 @@ const descriptors = [
50512
50512
  "iface": "String",
50513
50513
  "prop": "startsWith"
50514
50514
  },
50515
+ {
50516
+ "featureId": "string-trim-leftright",
50517
+ "kind": "instanceMember",
50518
+ "iface": "String",
50519
+ "prop": "trimLeft"
50520
+ },
50521
+ {
50522
+ "featureId": "string-trim-leftright",
50523
+ "kind": "instanceMember",
50524
+ "iface": "String",
50525
+ "prop": "trimRight"
50526
+ },
50515
50527
  {
50516
50528
  "featureId": "string-trim-startend",
50517
50529
  "kind": "instanceMember",
@@ -52404,8 +52416,9 @@ var features_api_default = {
52404
52416
  "id": "abortsignal-any",
52405
52417
  "name": "AbortSignal.any()",
52406
52418
  "status": {
52407
- "baseline": "low",
52419
+ "baseline": "high",
52408
52420
  "baseline_low_date": "2024-03-19",
52421
+ "baseline_high_date": "2026-09-19",
52409
52422
  "support": {
52410
52423
  "chrome": "116",
52411
52424
  "chrome_android": "116",
@@ -52606,8 +52619,12 @@ var features_api_default = {
52606
52619
  "id": "arianotify",
52607
52620
  "name": "ariaNotify()",
52608
52621
  "status": {
52609
- "baseline": false,
52622
+ "baseline": "low",
52623
+ "baseline_low_date": "2026-09-14",
52610
52624
  "support": {
52625
+ "chrome": "141",
52626
+ "chrome_android": "141",
52627
+ "edge": "141",
52611
52628
  "firefox": "150",
52612
52629
  "firefox_android": "150",
52613
52630
  "safari": "27",
@@ -53658,7 +53675,7 @@ var features_api_default = {
53658
53675
  },
53659
53676
  "container-queries": {
53660
53677
  "id": "container-queries",
53661
- "name": "Container queries",
53678
+ "name": "Container queries (size)",
53662
53679
  "group": ["container-queries"],
53663
53680
  "status": {
53664
53681
  "baseline": "high",
@@ -54989,11 +55006,7 @@ var features_api_default = {
54989
55006
  "name": "<fencedframe>",
54990
55007
  "status": {
54991
55008
  "baseline": false,
54992
- "support": {
54993
- "chrome": "128",
54994
- "chrome_android": "128",
54995
- "edge": "128"
54996
- }
55009
+ "support": { "edge": "128" }
54997
55010
  },
54998
55011
  "discouraged": {
54999
55012
  "according_to": ["https://groups.google.com/a/chromium.org/g/blink-dev/c/c9w5uH3eSuo/m/KcvocvF1DQAJ", "https://chromestatus.com/feature/6366274495053824"],
@@ -55292,7 +55305,10 @@ var features_api_default = {
55292
55305
  "name": "Responsive iframes",
55293
55306
  "status": {
55294
55307
  "baseline": false,
55295
- "support": {}
55308
+ "support": {
55309
+ "chrome": "154",
55310
+ "chrome_android": "154"
55311
+ }
55296
55312
  }
55297
55313
  },
55298
55314
  "fullscreen": {
@@ -63010,6 +63026,21 @@ var features_jsbi_default = {
63010
63026
  }
63011
63027
  }
63012
63028
  },
63029
+ "iterator-join": {
63030
+ "id": "iterator-join",
63031
+ "name": "Iterator join()",
63032
+ "group": ["iterators"],
63033
+ "status": {
63034
+ "baseline": false,
63035
+ "support": {
63036
+ "chrome": "153",
63037
+ "chrome_android": "153",
63038
+ "edge": "153",
63039
+ "firefox": "154",
63040
+ "firefox_android": "154"
63041
+ }
63042
+ }
63043
+ },
63013
63044
  "iterator-methods": {
63014
63045
  "id": "iterator-methods",
63015
63046
  "name": "Iterator methods",
@@ -63729,6 +63760,29 @@ var features_jsbi_default = {
63729
63760
  }
63730
63761
  }
63731
63762
  },
63763
+ "string-trim-leftright": {
63764
+ "id": "string-trim-leftright",
63765
+ "name": "String trimLeft() and trimRight()",
63766
+ "group": ["string"],
63767
+ "status": {
63768
+ "baseline": false,
63769
+ "support": {
63770
+ "chrome": "4",
63771
+ "chrome_android": "18",
63772
+ "edge": "12",
63773
+ "firefox": "3.5",
63774
+ "firefox_android": "4",
63775
+ "safari": "5",
63776
+ "safari_ios": "4.2"
63777
+ }
63778
+ },
63779
+ "discouraged": {
63780
+ "according_to": ["https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#String.prototype.trimleft"],
63781
+ "alternatives": ["string-trim-startend"],
63782
+ "reason": "TC39 recommends using trimStart() and trimEnd() instead. The trimLeft() and trimRight() aliases are provided for compatibility with old code.",
63783
+ "reason_html": "TC39 recommends using <code>trimStart()</code> and <code>trimEnd()</code> instead. The <code>trimLeft()</code> and <code>trimRight()</code> aliases are provided for compatibility with old code."
63784
+ }
63785
+ },
63732
63786
  "string-trim-startend": {
63733
63787
  "id": "string-trim-startend",
63734
63788
  "name": "String trimStart() and trimEnd()",
@@ -64312,6 +64366,10 @@ function addTypedInstanceMemberDetector(context, d, report) {
64312
64366
  const propertyOfType = checkerOk.getPropertyOfType;
64313
64367
  if (typeof propertyOfType !== "function") return {};
64314
64368
  const getPropertyOfType = propertyOfType.bind(checkerOk);
64369
+ function getBaseTypes(t) {
64370
+ const type = t;
64371
+ return type.getBaseTypes?.() || type.baseTypes || type.target?.getBaseTypes?.() || type.target?.baseTypes || [];
64372
+ }
64315
64373
  function typeMatches(t) {
64316
64374
  if (!t) return false;
64317
64375
  const withTypes = t;
@@ -64319,12 +64377,11 @@ function addTypedInstanceMemberDetector(context, d, report) {
64319
64377
  const withSym = t;
64320
64378
  const name = (withSym.symbol || withSym.aliasSymbol || withSym.getSymbol?.())?.name;
64321
64379
  if (name === iface || name?.endsWith(`.${iface}`)) return true;
64322
- const ap = checkerOk.getApparentType?.(t) || t;
64323
- const baseTypes = ap.getBaseTypes?.() || ap.baseTypes || [];
64380
+ const baseTypes = getBaseTypes(checkerOk.getApparentType?.(t) || t);
64324
64381
  if (baseTypes?.length) {
64325
64382
  if (baseTypes.some((bt) => bt.symbol?.name === iface)) return true;
64326
64383
  for (const bt of baseTypes) {
64327
- const bt2 = bt.getBaseTypes?.() || [];
64384
+ const bt2 = getBaseTypes(bt);
64328
64385
  if (Array.isArray(bt2) && bt2.some((b2) => b2.symbol?.name === iface)) return true;
64329
64386
  }
64330
64387
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-baseline-js",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Enforce JavaScript Baseline (widely/newly/year) browser compatibility with a single ESLint rule. Prevent runtime errors by catching unsupported JavaScript features during development.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,15 +45,15 @@
45
45
  "@semantic-release/changelog": "^7.0.0",
46
46
  "@semantic-release/git": "^11.0.1",
47
47
  "@types/eslint": "^9.6.1",
48
- "@types/node": "^26.6.2",
49
- "@typescript-eslint/parser": "^8.70.0",
48
+ "@types/node": "^26.6.3",
49
+ "@typescript-eslint/parser": "^8.70.1",
50
50
  "eslint": "^10.11.0",
51
51
  "semantic-release": "^25.0.9",
52
52
  "tsdown": "0.23.0",
53
53
  "typescript": "^6.0.3",
54
- "vitest": "^4.1.11",
54
+ "vitest": "^5.0.2",
55
55
  "vue-eslint-parser": "^10.4.1",
56
- "web-features": "3.39.0"
56
+ "web-features": "3.40.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "eslint": ">=9.29.0 <11"