@automattic/eslint-config-target-es 2.2.2 → 3.0.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/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.0] - 2025-05-13
9
+ ### Added
10
+ - Add keywords in package.json for npm search. [#42948]
11
+
12
+ ### Changed
13
+ - Update dependencies. [#42002]
14
+ - Update eslint-plugin-es-x and enable many new rules. [#42045]
15
+ - Update package dependencies. [#42037] [#42040] [#42163] [#42324] [#42809] [#43199] [#43200] [#43291] [#43313] [#43326]
16
+
8
17
  ## [2.2.2] - 2025-02-05
9
18
  ### Changed
10
19
  - Updated package dependencies. [#40564] [#41099] [#41491]
@@ -82,6 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
82
91
  ### Added
83
92
  - Initial release.
84
93
 
94
+ [3.0.0]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.2...3.0.0
85
95
  [2.2.2]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.1...2.2.2
86
96
  [2.2.1]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.0...2.2.1
87
97
  [2.2.0]: https://github.com/Automattic/eslint-config-target-es/compare/2.1.0...2.2.0
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "@automattic/eslint-config-target-es",
3
- "version": "2.2.2",
4
- "description": "ESLint sharable config to activate eslint-plugin-es checks based on browserslist targets.",
3
+ "version": "3.0.0",
4
+ "description": "ESLint sharable config to activate eslint-plugin-es-x checks based on browserslist targets.",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/eslint-config-target-es/README.md#readme",
6
6
  "bugs": {
7
7
  "url": "https://github.com/Automattic/jetpack/labels/[JS Package] Eslint Config Target Es"
8
8
  },
9
+ "keywords": [
10
+ "eslint",
11
+ "config",
12
+ "eslint-config",
13
+ "eslintconfig",
14
+ "browserslist"
15
+ ],
9
16
  "repository": {
10
17
  "type": "git",
11
18
  "url": "https://github.com/Automattic/jetpack.git",
@@ -18,21 +25,21 @@
18
25
  "test-coverage": "pnpm run test --coverage"
19
26
  },
20
27
  "dependencies": {
21
- "@mdn/browser-compat-data": "5.5.49",
28
+ "@mdn/browser-compat-data": "6.0.8",
22
29
  "browserslist": "^4.17.6",
23
30
  "debug": "^4.3.2",
24
31
  "semver": "^7.3.5"
25
32
  },
26
33
  "devDependencies": {
27
- "@wordpress/browserslist-config": "6.17.0",
28
- "eslint": "9.16.0",
29
- "eslint-plugin-es-x": "7.8.0",
30
- "globals": "15.4.0",
34
+ "@wordpress/browserslist-config": "6.22.0",
35
+ "eslint": "9.25.1",
36
+ "eslint-plugin-es-x": "8.6.2",
37
+ "globals": "16.0.0",
31
38
  "jest": "29.7.0"
32
39
  },
33
40
  "peerDependencies": {
34
41
  "eslint": ">=4.19.1",
35
- "eslint-plugin-es-x": "^7.6.0",
42
+ "eslint-plugin-es-x": "^8.0.0",
36
43
  "globals": ">=15.4.0"
37
44
  },
38
45
  "peerDependenciesMeta": {
package/src/rulesMap.js CHANGED
@@ -2,16 +2,42 @@
2
2
  // Values are either a path, an array of paths, true to always enable the rule, or false to always disable it.
3
3
  module.exports = {
4
4
  // ES2025
5
+ 'no-dataview-prototype-getfloat16-setfloat16': [
6
+ 'javascript.builtins.DataView.getFloat16',
7
+ 'javascript.builtins.DataView.setFloat16',
8
+ ],
9
+ 'no-dynamic-import-options': 'javascript.operators.import.options_parameter',
10
+ 'no-float16array': 'javascript.builtins.Float16Array',
11
+ 'no-import-attributes': 'javascript.statements.import.import_attributes',
12
+ 'no-intl-durationformat': 'javascript.builtins.Intl.DurationFormat',
13
+ 'no-iterator': 'javascript.builtins.Iterator',
14
+ 'no-iterator-prototype-drop': 'javascript.builtins.Iterator.drop',
15
+ 'no-iterator-prototype-every': 'javascript.builtins.Iterator.every',
16
+ 'no-iterator-prototype-filter': 'javascript.builtins.Iterator.filter',
17
+ 'no-iterator-prototype-find': 'javascript.builtins.Iterator.find',
18
+ 'no-iterator-prototype-flatmap': 'javascript.builtins.Iterator.flatMap',
19
+ 'no-iterator-prototype-foreach': 'javascript.builtins.Iterator.forEach',
20
+ 'no-iterator-prototype-map': 'javascript.builtins.Iterator.map',
21
+ 'no-iterator-prototype-reduce': 'javascript.builtins.Iterator.reduce',
22
+ 'no-iterator-prototype-some': 'javascript.builtins.Iterator.some',
23
+ 'no-iterator-prototype-take': 'javascript.builtins.Iterator.take',
24
+ 'no-iterator-prototype-toarray': 'javascript.builtins.Iterator.toArray',
25
+ 'no-json-modules': 'javascript.statements.import.import_attributes.type_json',
26
+ 'no-math-f16round': 'javascript.builtins.Math.f16round',
27
+ 'no-promise-try': 'javascript.builtins.Promise.try',
5
28
  'no-regexp-duplicate-named-capturing-groups':
6
29
  'javascript.regular_expressions.named_capturing_group.duplicate_named_capturing_groups',
30
+ 'no-regexp-escape': 'javascript.builtins.RegExp.escape',
31
+ 'no-regexp-modifiers': 'javascript.regular_expressions.modifier',
32
+ 'no-trailing-dynamic-import-commas':
33
+ 'javascript.grammar.trailing_commas.trailing_commas_in_dynamic_import',
7
34
 
8
35
  // ES2024
9
36
  'no-arraybuffer-prototype-transfer': 'javascript.builtins.ArrayBuffer.transfer',
10
37
  'no-atomics-waitasync': 'javascript.builtins.Atomics.waitAsync',
11
- 'no-object-map-groupby': [
12
- 'javascript.builtins.Map.groupBy',
13
- 'javascript.builtins.Object.groupBy',
14
- ],
38
+ 'no-map-groupby': 'javascript.builtins.Map.groupBy',
39
+ 'no-object-groupby': 'javascript.builtins.Object.groupBy',
40
+ 'no-object-map-groupby': false, // Deprecated
15
41
  'no-promise-withresolvers': 'javascript.builtins.Promise.withResolvers',
16
42
  'no-regexp-v-flag': 'javascript.builtins.RegExp.unicodeSets',
17
43
  'no-resizable-and-growable-arraybuffers': [
@@ -31,10 +57,9 @@ module.exports = {
31
57
  'no-set-prototype-issupersetof': 'javascript.builtins.Set.isSupersetOf',
32
58
  'no-set-prototype-symmetricdifference': 'javascript.builtins.Set.symmetricDifference',
33
59
  'no-set-prototype-union': 'javascript.builtins.Set.union',
34
- 'no-string-prototype-iswellformed-towellformed': [
35
- 'javascript.builtins.String.isWellFormed',
36
- 'javascript.builtins.String.toWellFormed',
37
- ],
60
+ 'no-string-prototype-iswellformed': 'javascript.builtins.String.isWellFormed',
61
+ 'no-string-prototype-iswellformed-towellformed': false, // Deprecated
62
+ 'no-string-prototype-towellformed': 'javascript.builtins.String.toWellFormed',
38
63
 
39
64
  // ES2023
40
65
  'no-array-prototype-findlast-findlastindex': [
@@ -53,18 +78,20 @@ module.exports = {
53
78
  'no-regexp-unicode-property-escapes-2023': false, // No support data in MDN separate from no-regexp-unicode-property-escapes. https://github.com/mdn/browser-compat-data/issues/19631
54
79
 
55
80
  // ES2022
56
- 'no-arbitrary-module-namespace-names': false, // No support data. https://github.com/mdn/browser-compat-data/issues/18152
57
- 'no-array-string-prototype-at': [
58
- 'javascript.builtins.Array.at',
59
- 'javascript.builtins.String.at',
60
- 'javascript.builtins.TypedArray.at',
81
+ 'no-arbitrary-module-namespace-names': [
82
+ 'javascript.statements.export.arbitrary_module_namespace_identifier_names',
83
+ 'javascript.statements.import.arbitrary_module_namespace_identifier_names',
61
84
  ],
62
- 'no-class-fields': [
63
- 'javascript.classes.private_class_fields',
64
- 'javascript.classes.private_class_methods',
85
+ 'no-array-prototype-at': 'javascript.builtins.Array.at',
86
+ 'no-array-string-prototype-at': false, // Deprecated
87
+ 'no-class-fields': false, // Deprecated
88
+ 'no-class-instance-fields': [
65
89
  'javascript.classes.public_class_fields',
66
- 'javascript.classes.static_class_fields',
90
+ 'javascript.classes.private_class_fields',
67
91
  ],
92
+ 'no-class-private-fields': 'javascript.classes.private_class_fields',
93
+ 'no-class-private-methods': 'javascript.classes.private_class_methods',
94
+ 'no-class-static-fields': 'javascript.classes.static_class_fields',
68
95
  'no-class-static-block': 'javascript.classes.static_initialization_blocks',
69
96
  'no-error-cause': [
70
97
  'javascript.builtins.Error.Error.options_cause_parameter',
@@ -76,6 +103,7 @@ module.exports = {
76
103
  'no-private-in': 'javascript.classes.private_class_fields_in',
77
104
  'no-regexp-d-flag': 'javascript.builtins.RegExp.hasIndices',
78
105
  'no-regexp-unicode-property-escapes-2022': false, // No support data in MDN separate from no-regexp-unicode-property-escapes. https://github.com/mdn/browser-compat-data/issues/19631
106
+ 'no-string-prototype-at': 'javascript.builtins.String.at',
79
107
  'no-top-level-await': 'javascript.operators.await.top_level',
80
108
 
81
109
  // ES2021
@@ -360,4 +388,75 @@ module.exports = {
360
388
  'javascript.builtins.Object.lookupGetter',
361
389
  'javascript.builtins.Object.lookupSetter',
362
390
  ],
391
+
392
+ // "No nonstandard properties" rules.
393
+ // No compat data for any of these, as far as I can tell.
394
+ 'no-nonstandard-array-properties': false,
395
+ 'no-nonstandard-array-prototype-properties': false,
396
+ 'no-nonstandard-arraybuffer-properties': false,
397
+ 'no-nonstandard-arraybuffer-prototype-properties': false,
398
+ 'no-nonstandard-atomics-properties': false,
399
+ 'no-nonstandard-bigint-properties': false,
400
+ 'no-nonstandard-bigint-prototype-properties': false,
401
+ 'no-nonstandard-boolean-properties': false,
402
+ 'no-nonstandard-boolean-prototype-properties': false,
403
+ 'no-nonstandard-dataview-properties': false,
404
+ 'no-nonstandard-dataview-prototype-properties': false,
405
+ 'no-nonstandard-date-properties': false,
406
+ 'no-nonstandard-date-prototype-properties': false,
407
+ 'no-nonstandard-finalizationregistry-properties': false,
408
+ 'no-nonstandard-finalizationregistry-prototype-properties': false,
409
+ 'no-nonstandard-function-properties': false,
410
+ 'no-nonstandard-intl-collator-properties': false,
411
+ 'no-nonstandard-intl-collator-prototype-properties': false,
412
+ 'no-nonstandard-intl-datetimeformat-properties': false,
413
+ 'no-nonstandard-intl-datetimeformat-prototype-properties': false,
414
+ 'no-nonstandard-intl-displaynames-properties': false,
415
+ 'no-nonstandard-intl-displaynames-prototype-properties': false,
416
+ 'no-nonstandard-intl-durationformat-properties': false,
417
+ 'no-nonstandard-intl-durationformat-prototype-properties': false,
418
+ 'no-nonstandard-intl-listformat-properties': false,
419
+ 'no-nonstandard-intl-listformat-prototype-properties': false,
420
+ 'no-nonstandard-intl-locale-properties': false,
421
+ 'no-nonstandard-intl-locale-prototype-properties': false,
422
+ 'no-nonstandard-intl-numberformat-properties': false,
423
+ 'no-nonstandard-intl-numberformat-prototype-properties': false,
424
+ 'no-nonstandard-intl-pluralrules-properties': false,
425
+ 'no-nonstandard-intl-pluralrules-prototype-properties': false,
426
+ 'no-nonstandard-intl-properties': false,
427
+ 'no-nonstandard-intl-relativetimeformat-properties': false,
428
+ 'no-nonstandard-intl-relativetimeformat-prototype-properties': false,
429
+ 'no-nonstandard-intl-segmenter-properties': false,
430
+ 'no-nonstandard-intl-segmenter-prototype-properties': false,
431
+ 'no-nonstandard-iterator-properties': false,
432
+ 'no-nonstandard-iterator-prototype-properties': false,
433
+ 'no-nonstandard-json-properties': false,
434
+ 'no-nonstandard-map-properties': false,
435
+ 'no-nonstandard-map-prototype-properties': false,
436
+ 'no-nonstandard-math-properties': false,
437
+ 'no-nonstandard-number-properties': false,
438
+ 'no-nonstandard-number-prototype-properties': false,
439
+ 'no-nonstandard-object-properties': false,
440
+ 'no-nonstandard-promise-properties': false,
441
+ 'no-nonstandard-promise-prototype-properties': false,
442
+ 'no-nonstandard-proxy-properties': false,
443
+ 'no-nonstandard-reflect-properties': false,
444
+ 'no-nonstandard-regexp-properties': false,
445
+ 'no-nonstandard-regexp-prototype-properties': false,
446
+ 'no-nonstandard-set-properties': false,
447
+ 'no-nonstandard-set-prototype-properties': false,
448
+ 'no-nonstandard-sharedarraybuffer-properties': false,
449
+ 'no-nonstandard-sharedarraybuffer-prototype-properties': false,
450
+ 'no-nonstandard-string-properties': false,
451
+ 'no-nonstandard-string-prototype-properties': false,
452
+ 'no-nonstandard-symbol-properties': false,
453
+ 'no-nonstandard-symbol-prototype-properties': false,
454
+ 'no-nonstandard-typed-array-properties': false,
455
+ 'no-nonstandard-typed-array-prototype-properties': false,
456
+ 'no-nonstandard-weakmap-properties': false,
457
+ 'no-nonstandard-weakmap-prototype-properties': false,
458
+ 'no-nonstandard-weakref-properties': false,
459
+ 'no-nonstandard-weakref-prototype-properties': false,
460
+ 'no-nonstandard-weakset-properties': false,
461
+ 'no-nonstandard-weakset-prototype-properties': false,
363
462
  };