@automattic/eslint-config-target-es 2.2.2 → 4.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 +18 -0
- package/package.json +29 -22
- package/src/rulesMap.js +133 -18
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ 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
|
+
## [4.0.0] - 2025-08-06
|
|
9
|
+
### Added
|
|
10
|
+
- Enable new rules from `eslint-plugin-es-x'. [#44288]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Update package dependencies. [#43522] [#43578] [#44020] [#44148] [#44217] [#44276] [#44288] [#44289] [#44355] [#44508]
|
|
14
|
+
|
|
15
|
+
## [3.0.0] - 2025-05-13
|
|
16
|
+
### Added
|
|
17
|
+
- Add keywords in package.json for npm search. [#42948]
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Update dependencies. [#42002]
|
|
21
|
+
- Update eslint-plugin-es-x and enable many new rules. [#42045]
|
|
22
|
+
- Update package dependencies. [#42037] [#42040] [#42163] [#42324] [#42809] [#43199] [#43200] [#43291] [#43313] [#43326]
|
|
23
|
+
|
|
8
24
|
## [2.2.2] - 2025-02-05
|
|
9
25
|
### Changed
|
|
10
26
|
- Updated package dependencies. [#40564] [#41099] [#41491]
|
|
@@ -82,6 +98,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
82
98
|
### Added
|
|
83
99
|
- Initial release.
|
|
84
100
|
|
|
101
|
+
[4.0.0]: https://github.com/Automattic/eslint-config-target-es/compare/3.0.0...4.0.0
|
|
102
|
+
[3.0.0]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.2...3.0.0
|
|
85
103
|
[2.2.2]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.1...2.2.2
|
|
86
104
|
[2.2.1]: https://github.com/Automattic/eslint-config-target-es/compare/2.2.0...2.2.1
|
|
87
105
|
[2.2.0]: https://github.com/Automattic/eslint-config-target-es/compare/2.1.0...2.2.0
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/eslint-config-target-es",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "ESLint sharable config to activate eslint-plugin-es checks based on browserslist targets.",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "ESLint sharable config to activate eslint-plugin-es-x checks based on browserslist targets.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"config",
|
|
8
|
+
"eslint-config",
|
|
9
|
+
"eslintconfig",
|
|
10
|
+
"browserslist"
|
|
11
|
+
],
|
|
5
12
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/eslint-config-target-es/README.md#readme",
|
|
6
13
|
"bugs": {
|
|
7
14
|
"url": "https://github.com/Automattic/jetpack/labels/[JS Package] Eslint Config Target Es"
|
|
@@ -13,44 +20,44 @@
|
|
|
13
20
|
},
|
|
14
21
|
"license": "GPL-2.0-or-later",
|
|
15
22
|
"author": "Automattic",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./src/eslintrc/all.js",
|
|
25
|
+
"./all": "./src/eslintrc/all.js",
|
|
26
|
+
"./builtins": "./src/eslintrc/builtins.js",
|
|
27
|
+
"./flat/all": "./src/flatconfig/all.js",
|
|
28
|
+
"./flat/builtins": "./src/flatconfig/builtins.js",
|
|
29
|
+
"./flat/language": "./src/flatconfig/language.js",
|
|
30
|
+
"./functions": "./src/funcs.js",
|
|
31
|
+
"./language": "./src/eslintrc/language.js",
|
|
32
|
+
"./rc/all": "./src/eslintrc/all.js",
|
|
33
|
+
"./rc/builtins": "./src/eslintrc/builtins.js",
|
|
34
|
+
"./rc/language": "./src/eslintrc/language.js"
|
|
35
|
+
},
|
|
16
36
|
"scripts": {
|
|
17
37
|
"test": "jest --config=tests/jest.config.cjs",
|
|
18
38
|
"test-coverage": "pnpm run test --coverage"
|
|
19
39
|
},
|
|
20
40
|
"dependencies": {
|
|
21
|
-
"@mdn/browser-compat-data": "
|
|
41
|
+
"@mdn/browser-compat-data": "6.0.31",
|
|
22
42
|
"browserslist": "^4.17.6",
|
|
23
43
|
"debug": "^4.3.2",
|
|
24
44
|
"semver": "^7.3.5"
|
|
25
45
|
},
|
|
26
46
|
"devDependencies": {
|
|
27
|
-
"@wordpress/browserslist-config": "6.
|
|
28
|
-
"eslint": "9.
|
|
29
|
-
"eslint-plugin-es-x": "
|
|
30
|
-
"globals": "
|
|
31
|
-
"jest": "
|
|
47
|
+
"@wordpress/browserslist-config": "6.26.0",
|
|
48
|
+
"eslint": "9.32.0",
|
|
49
|
+
"eslint-plugin-es-x": "9.0.0",
|
|
50
|
+
"globals": "16.0.0",
|
|
51
|
+
"jest": "30.0.4"
|
|
32
52
|
},
|
|
33
53
|
"peerDependencies": {
|
|
34
54
|
"eslint": ">=4.19.1",
|
|
35
|
-
"eslint-plugin-es-x": "^
|
|
55
|
+
"eslint-plugin-es-x": "^8.0.0 || ^9.0.0",
|
|
36
56
|
"globals": ">=15.4.0"
|
|
37
57
|
},
|
|
38
58
|
"peerDependenciesMeta": {
|
|
39
59
|
"globals": {
|
|
40
60
|
"optional": true
|
|
41
61
|
}
|
|
42
|
-
},
|
|
43
|
-
"exports": {
|
|
44
|
-
".": "./src/eslintrc/all.js",
|
|
45
|
-
"./language": "./src/eslintrc/language.js",
|
|
46
|
-
"./builtins": "./src/eslintrc/builtins.js",
|
|
47
|
-
"./all": "./src/eslintrc/all.js",
|
|
48
|
-
"./rc/language": "./src/eslintrc/language.js",
|
|
49
|
-
"./rc/builtins": "./src/eslintrc/builtins.js",
|
|
50
|
-
"./rc/all": "./src/eslintrc/all.js",
|
|
51
|
-
"./flat/language": "./src/flatconfig/language.js",
|
|
52
|
-
"./flat/builtins": "./src/flatconfig/builtins.js",
|
|
53
|
-
"./flat/all": "./src/flatconfig/all.js",
|
|
54
|
-
"./functions": "./src/funcs.js"
|
|
55
62
|
}
|
|
56
63
|
}
|
package/src/rulesMap.js
CHANGED
|
@@ -1,17 +1,53 @@
|
|
|
1
1
|
// Map of eslint-plugin-es-x rules to MDN compat-data paths.
|
|
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
|
+
// ES2026
|
|
5
|
+
'no-array-fromasync': 'javascript.builtins.Array.fromAsync',
|
|
6
|
+
'no-asyncdisposablestack': 'javascript.builtins.AsyncDisposableStack.AsyncDisposableStack',
|
|
7
|
+
'no-disposablestack': 'javascript.builtins.DisposableStack.DisposableStack',
|
|
8
|
+
'no-error-iserror': 'javascript.builtins.Error.isError',
|
|
9
|
+
'no-suppressederror': 'javascript.builtins.SuppressedError.SuppressedError',
|
|
10
|
+
'no-symbol-asyncdispose': 'javascript.builtins.Symbol.asyncDispose',
|
|
11
|
+
'no-symbol-dispose': 'javascript.builtins.Symbol.dispose',
|
|
12
|
+
'no-using-declarations': 'javascript.statements.using',
|
|
13
|
+
|
|
4
14
|
// ES2025
|
|
15
|
+
'no-dataview-prototype-getfloat16-setfloat16': [
|
|
16
|
+
'javascript.builtins.DataView.getFloat16',
|
|
17
|
+
'javascript.builtins.DataView.setFloat16',
|
|
18
|
+
],
|
|
19
|
+
'no-dynamic-import-options': 'javascript.operators.import.options_parameter',
|
|
20
|
+
'no-float16array': 'javascript.builtins.Float16Array',
|
|
21
|
+
'no-import-attributes': 'javascript.statements.import.import_attributes',
|
|
22
|
+
'no-intl-durationformat': 'javascript.builtins.Intl.DurationFormat',
|
|
23
|
+
'no-iterator': 'javascript.builtins.Iterator',
|
|
24
|
+
'no-iterator-prototype-drop': 'javascript.builtins.Iterator.drop',
|
|
25
|
+
'no-iterator-prototype-every': 'javascript.builtins.Iterator.every',
|
|
26
|
+
'no-iterator-prototype-filter': 'javascript.builtins.Iterator.filter',
|
|
27
|
+
'no-iterator-prototype-find': 'javascript.builtins.Iterator.find',
|
|
28
|
+
'no-iterator-prototype-flatmap': 'javascript.builtins.Iterator.flatMap',
|
|
29
|
+
'no-iterator-prototype-foreach': 'javascript.builtins.Iterator.forEach',
|
|
30
|
+
'no-iterator-prototype-map': 'javascript.builtins.Iterator.map',
|
|
31
|
+
'no-iterator-prototype-reduce': 'javascript.builtins.Iterator.reduce',
|
|
32
|
+
'no-iterator-prototype-some': 'javascript.builtins.Iterator.some',
|
|
33
|
+
'no-iterator-prototype-take': 'javascript.builtins.Iterator.take',
|
|
34
|
+
'no-iterator-prototype-toarray': 'javascript.builtins.Iterator.toArray',
|
|
35
|
+
'no-json-modules': 'javascript.statements.import.import_attributes.type_json',
|
|
36
|
+
'no-math-f16round': 'javascript.builtins.Math.f16round',
|
|
37
|
+
'no-promise-try': 'javascript.builtins.Promise.try',
|
|
5
38
|
'no-regexp-duplicate-named-capturing-groups':
|
|
6
39
|
'javascript.regular_expressions.named_capturing_group.duplicate_named_capturing_groups',
|
|
40
|
+
'no-regexp-escape': 'javascript.builtins.RegExp.escape',
|
|
41
|
+
'no-regexp-modifiers': 'javascript.regular_expressions.modifier',
|
|
42
|
+
'no-trailing-dynamic-import-commas':
|
|
43
|
+
'javascript.grammar.trailing_commas.trailing_commas_in_dynamic_import',
|
|
7
44
|
|
|
8
45
|
// ES2024
|
|
9
46
|
'no-arraybuffer-prototype-transfer': 'javascript.builtins.ArrayBuffer.transfer',
|
|
10
47
|
'no-atomics-waitasync': 'javascript.builtins.Atomics.waitAsync',
|
|
11
|
-
'no-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
],
|
|
48
|
+
'no-map-groupby': 'javascript.builtins.Map.groupBy',
|
|
49
|
+
'no-object-groupby': 'javascript.builtins.Object.groupBy',
|
|
50
|
+
'no-object-map-groupby': false, // Deprecated
|
|
15
51
|
'no-promise-withresolvers': 'javascript.builtins.Promise.withResolvers',
|
|
16
52
|
'no-regexp-v-flag': 'javascript.builtins.RegExp.unicodeSets',
|
|
17
53
|
'no-resizable-and-growable-arraybuffers': [
|
|
@@ -31,10 +67,9 @@ module.exports = {
|
|
|
31
67
|
'no-set-prototype-issupersetof': 'javascript.builtins.Set.isSupersetOf',
|
|
32
68
|
'no-set-prototype-symmetricdifference': 'javascript.builtins.Set.symmetricDifference',
|
|
33
69
|
'no-set-prototype-union': 'javascript.builtins.Set.union',
|
|
34
|
-
'no-string-prototype-iswellformed
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
],
|
|
70
|
+
'no-string-prototype-iswellformed': 'javascript.builtins.String.isWellFormed',
|
|
71
|
+
'no-string-prototype-iswellformed-towellformed': false, // Deprecated
|
|
72
|
+
'no-string-prototype-towellformed': 'javascript.builtins.String.toWellFormed',
|
|
38
73
|
|
|
39
74
|
// ES2023
|
|
40
75
|
'no-array-prototype-findlast-findlastindex': [
|
|
@@ -53,19 +88,21 @@ module.exports = {
|
|
|
53
88
|
'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
89
|
|
|
55
90
|
// ES2022
|
|
56
|
-
'no-arbitrary-module-namespace-names':
|
|
57
|
-
|
|
58
|
-
'javascript.
|
|
59
|
-
'javascript.builtins.String.at',
|
|
60
|
-
'javascript.builtins.TypedArray.at',
|
|
91
|
+
'no-arbitrary-module-namespace-names': [
|
|
92
|
+
'javascript.statements.export.arbitrary_module_namespace_identifier_names',
|
|
93
|
+
'javascript.statements.import.arbitrary_module_namespace_identifier_names',
|
|
61
94
|
],
|
|
62
|
-
'no-
|
|
63
|
-
|
|
64
|
-
|
|
95
|
+
'no-array-prototype-at': 'javascript.builtins.Array.at',
|
|
96
|
+
'no-array-string-prototype-at': false, // Deprecated
|
|
97
|
+
'no-class-fields': false, // Deprecated
|
|
98
|
+
'no-class-instance-fields': [
|
|
65
99
|
'javascript.classes.public_class_fields',
|
|
66
|
-
'javascript.classes.
|
|
100
|
+
'javascript.classes.private_class_fields',
|
|
67
101
|
],
|
|
68
|
-
'no-class-
|
|
102
|
+
'no-class-private-fields': 'javascript.classes.private_class_fields',
|
|
103
|
+
'no-class-private-methods': 'javascript.classes.private_class_methods',
|
|
104
|
+
'no-class-static-fields': 'javascript.classes.static.class_fields',
|
|
105
|
+
'no-class-static-block': 'javascript.classes.static.initialization_blocks',
|
|
69
106
|
'no-error-cause': [
|
|
70
107
|
'javascript.builtins.Error.Error.options_cause_parameter',
|
|
71
108
|
'javascript.builtins.Error.cause',
|
|
@@ -76,6 +113,7 @@ module.exports = {
|
|
|
76
113
|
'no-private-in': 'javascript.classes.private_class_fields_in',
|
|
77
114
|
'no-regexp-d-flag': 'javascript.builtins.RegExp.hasIndices',
|
|
78
115
|
'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
|
|
116
|
+
'no-string-prototype-at': 'javascript.builtins.String.at',
|
|
79
117
|
'no-top-level-await': 'javascript.operators.await.top_level',
|
|
80
118
|
|
|
81
119
|
// ES2021
|
|
@@ -111,6 +149,7 @@ module.exports = {
|
|
|
111
149
|
'no-promise-all-settled': 'javascript.builtins.Promise.allSettled',
|
|
112
150
|
'no-regexp-unicode-property-escapes-2020': false, // No support data in MDN separate from no-regexp-unicode-property-escapes. https://github.com/mdn/browser-compat-data/issues/19631
|
|
113
151
|
'no-string-prototype-matchall': 'javascript.builtins.String.matchAll',
|
|
152
|
+
'no-symbol-matchall': 'javascript.builtins.Symbol.matchAll',
|
|
114
153
|
|
|
115
154
|
// ES2019
|
|
116
155
|
'no-array-prototype-flat': [
|
|
@@ -360,4 +399,80 @@ module.exports = {
|
|
|
360
399
|
'javascript.builtins.Object.lookupGetter',
|
|
361
400
|
'javascript.builtins.Object.lookupSetter',
|
|
362
401
|
],
|
|
402
|
+
|
|
403
|
+
// "No nonstandard properties" rules.
|
|
404
|
+
// No compat data for any of these, as far as I can tell.
|
|
405
|
+
'no-nonstandard-array-properties': false,
|
|
406
|
+
'no-nonstandard-array-prototype-properties': false,
|
|
407
|
+
'no-nonstandard-arraybuffer-properties': false,
|
|
408
|
+
'no-nonstandard-arraybuffer-prototype-properties': false,
|
|
409
|
+
'no-nonstandard-asyncdisposablestack-properties': false,
|
|
410
|
+
'no-nonstandard-asyncdisposablestack-prototype-properties': false,
|
|
411
|
+
'no-nonstandard-atomics-properties': false,
|
|
412
|
+
'no-nonstandard-bigint-properties': false,
|
|
413
|
+
'no-nonstandard-bigint-prototype-properties': false,
|
|
414
|
+
'no-nonstandard-boolean-properties': false,
|
|
415
|
+
'no-nonstandard-boolean-prototype-properties': false,
|
|
416
|
+
'no-nonstandard-dataview-properties': false,
|
|
417
|
+
'no-nonstandard-dataview-prototype-properties': false,
|
|
418
|
+
'no-nonstandard-date-properties': false,
|
|
419
|
+
'no-nonstandard-date-prototype-properties': false,
|
|
420
|
+
'no-nonstandard-disposablestack-properties': false,
|
|
421
|
+
'no-nonstandard-disposablestack-prototype-properties': false,
|
|
422
|
+
'no-nonstandard-error-properties': false,
|
|
423
|
+
'no-nonstandard-finalizationregistry-properties': false,
|
|
424
|
+
'no-nonstandard-finalizationregistry-prototype-properties': false,
|
|
425
|
+
'no-nonstandard-function-properties': false,
|
|
426
|
+
'no-nonstandard-intl-collator-properties': false,
|
|
427
|
+
'no-nonstandard-intl-collator-prototype-properties': false,
|
|
428
|
+
'no-nonstandard-intl-datetimeformat-properties': false,
|
|
429
|
+
'no-nonstandard-intl-datetimeformat-prototype-properties': false,
|
|
430
|
+
'no-nonstandard-intl-displaynames-properties': false,
|
|
431
|
+
'no-nonstandard-intl-displaynames-prototype-properties': false,
|
|
432
|
+
'no-nonstandard-intl-durationformat-properties': false,
|
|
433
|
+
'no-nonstandard-intl-durationformat-prototype-properties': false,
|
|
434
|
+
'no-nonstandard-intl-listformat-properties': false,
|
|
435
|
+
'no-nonstandard-intl-listformat-prototype-properties': false,
|
|
436
|
+
'no-nonstandard-intl-locale-properties': false,
|
|
437
|
+
'no-nonstandard-intl-locale-prototype-properties': false,
|
|
438
|
+
'no-nonstandard-intl-numberformat-properties': false,
|
|
439
|
+
'no-nonstandard-intl-numberformat-prototype-properties': false,
|
|
440
|
+
'no-nonstandard-intl-pluralrules-properties': false,
|
|
441
|
+
'no-nonstandard-intl-pluralrules-prototype-properties': false,
|
|
442
|
+
'no-nonstandard-intl-properties': false,
|
|
443
|
+
'no-nonstandard-intl-relativetimeformat-properties': false,
|
|
444
|
+
'no-nonstandard-intl-relativetimeformat-prototype-properties': false,
|
|
445
|
+
'no-nonstandard-intl-segmenter-properties': false,
|
|
446
|
+
'no-nonstandard-intl-segmenter-prototype-properties': false,
|
|
447
|
+
'no-nonstandard-iterator-properties': false,
|
|
448
|
+
'no-nonstandard-iterator-prototype-properties': false,
|
|
449
|
+
'no-nonstandard-json-properties': false,
|
|
450
|
+
'no-nonstandard-map-properties': false,
|
|
451
|
+
'no-nonstandard-map-prototype-properties': false,
|
|
452
|
+
'no-nonstandard-math-properties': false,
|
|
453
|
+
'no-nonstandard-number-properties': false,
|
|
454
|
+
'no-nonstandard-number-prototype-properties': false,
|
|
455
|
+
'no-nonstandard-object-properties': false,
|
|
456
|
+
'no-nonstandard-promise-properties': false,
|
|
457
|
+
'no-nonstandard-promise-prototype-properties': false,
|
|
458
|
+
'no-nonstandard-proxy-properties': false,
|
|
459
|
+
'no-nonstandard-reflect-properties': false,
|
|
460
|
+
'no-nonstandard-regexp-properties': false,
|
|
461
|
+
'no-nonstandard-regexp-prototype-properties': false,
|
|
462
|
+
'no-nonstandard-set-properties': false,
|
|
463
|
+
'no-nonstandard-set-prototype-properties': false,
|
|
464
|
+
'no-nonstandard-sharedarraybuffer-properties': false,
|
|
465
|
+
'no-nonstandard-sharedarraybuffer-prototype-properties': false,
|
|
466
|
+
'no-nonstandard-string-properties': false,
|
|
467
|
+
'no-nonstandard-string-prototype-properties': false,
|
|
468
|
+
'no-nonstandard-symbol-properties': false,
|
|
469
|
+
'no-nonstandard-symbol-prototype-properties': false,
|
|
470
|
+
'no-nonstandard-typed-array-properties': false,
|
|
471
|
+
'no-nonstandard-typed-array-prototype-properties': false,
|
|
472
|
+
'no-nonstandard-weakmap-properties': false,
|
|
473
|
+
'no-nonstandard-weakmap-prototype-properties': false,
|
|
474
|
+
'no-nonstandard-weakref-properties': false,
|
|
475
|
+
'no-nonstandard-weakref-prototype-properties': false,
|
|
476
|
+
'no-nonstandard-weakset-properties': false,
|
|
477
|
+
'no-nonstandard-weakset-prototype-properties': false,
|
|
363
478
|
};
|