Skip to content

Commit 9a40e08

Browse files
Copilotota-meshi
andauthored
Add rules for Upsert proposal (#311)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com> Co-authored-by: yosuke ota <otameshiyo23@gmail.com>
1 parent c7af216 commit 9a40e08

27 files changed

+957
-16
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-es-x": minor
3+
---
4+
5+
Add `es-x/no-map-prototype-getorinsert` rule
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-es-x": minor
3+
---
4+
5+
Add `es-x/no-map-prototype-getorinsertcomputed` rule
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-es-x": minor
3+
---
4+
5+
Add `es-x/no-weakmap-prototype-getorinsert` rule
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-es-x": minor
3+
---
4+
5+
Add `es-x/no-weakmap-prototype-getorinsertcomputed` rule

.changeset/witty-animals-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-es-x": minor
3+
---
4+
5+
Add `no-upsert` config

docs/configs/index.md

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ export default [
10441044
disallow proposal ES2026 [Uint8Array to/from Base64 and Hex](https://github.com/tc39/proposal-arraybuffer-base64)\
10451045
⚠️ This config will be changed in the minor versions of this plugin.
10461046

1047-
This configs includes rules for [es-x/no-uint8array-frombase64](../rules/no-uint8array-frombase64.md), [es-x/no-uint8array-fromhex](../rules/no-uint8array-fromhex.md), [es-x/no-uint8array-prototype-setfrombase64](../rules/no-uint8array-prototype-setfrombase64.md), [es-x/no-uint8array-prototype-setfromhex](../rules/no-uint8array-prototype-setfromhex.md), [es-x/no-uint8array-prototype-tobase64](../rules/no-uint8array-prototype-tobase64.md), and [es-x/no-uint8array-prototype-tohex](../rules/no-uint8array-prototype-tohex.md).
1047+
This config includes the rules [es-x/no-uint8array-frombase64](../rules/no-uint8array-frombase64.md), [es-x/no-uint8array-fromhex](../rules/no-uint8array-fromhex.md), [es-x/no-uint8array-prototype-setfrombase64](../rules/no-uint8array-prototype-setfrombase64.md), [es-x/no-uint8array-prototype-setfromhex](../rules/no-uint8array-prototype-setfromhex.md), [es-x/no-uint8array-prototype-tobase64](../rules/no-uint8array-prototype-tobase64.md), and [es-x/no-uint8array-prototype-tohex](../rules/no-uint8array-prototype-tohex.md).
10481048

10491049
```js
10501050
import pluginESx from "eslint-plugin-es-x"
@@ -1070,7 +1070,7 @@ export default [
10701070
disallow proposal ES2026 [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)\
10711071
⚠️ This config will be changed in the minor versions of this plugin.
10721072

1073-
This configs includes rules for [es-x/no-asyncdisposablestack](../rules/no-asyncdisposablestack.md), [es-x/no-disposablestack](../rules/no-disposablestack.md), [es-x/no-suppressederror](../rules/no-suppressederror.md), [es-x/no-symbol-asyncdispose](../rules/no-symbol-asyncdispose.md), [es-x/no-symbol-dispose](../rules/no-symbol-dispose.md), and [es-x/no-using-declarations](../rules/no-using-declarations.md).
1073+
This config includes the rules [es-x/no-asyncdisposablestack](../rules/no-asyncdisposablestack.md), [es-x/no-disposablestack](../rules/no-disposablestack.md), [es-x/no-suppressederror](../rules/no-suppressederror.md), [es-x/no-symbol-asyncdispose](../rules/no-symbol-asyncdispose.md), [es-x/no-symbol-dispose](../rules/no-symbol-dispose.md), and [es-x/no-using-declarations](../rules/no-using-declarations.md).
10741074

10751075
```js
10761076
import pluginESx from "eslint-plugin-es-x"
@@ -1096,7 +1096,7 @@ export default [
10961096
disallow proposal ES2026 Intl API [Intl Locale Info API](https://github.com/tc39/proposal-intl-locale-info)\
10971097
⚠️ This config will be changed in the minor versions of this plugin.
10981098

1099-
This configs includes rules for [es-x/no-intl-locale-prototype-firstdayofweek](../rules/no-intl-locale-prototype-firstdayofweek.md), [es-x/no-intl-locale-prototype-getcalendars](../rules/no-intl-locale-prototype-getcalendars.md), [es-x/no-intl-locale-prototype-getcollations](../rules/no-intl-locale-prototype-getcollations.md), [es-x/no-intl-locale-prototype-gethourcycles](../rules/no-intl-locale-prototype-gethourcycles.md), [es-x/no-intl-locale-prototype-getnumberingsystems](../rules/no-intl-locale-prototype-getnumberingsystems.md), [es-x/no-intl-locale-prototype-gettextinfo](../rules/no-intl-locale-prototype-gettextinfo.md), [es-x/no-intl-locale-prototype-gettimezones](../rules/no-intl-locale-prototype-gettimezones.md), and [es-x/no-intl-locale-prototype-getweekinfo](../rules/no-intl-locale-prototype-getweekinfo.md).
1099+
This config includes the rules [es-x/no-intl-locale-prototype-firstdayofweek](../rules/no-intl-locale-prototype-firstdayofweek.md), [es-x/no-intl-locale-prototype-getcalendars](../rules/no-intl-locale-prototype-getcalendars.md), [es-x/no-intl-locale-prototype-getcollations](../rules/no-intl-locale-prototype-getcollations.md), [es-x/no-intl-locale-prototype-gethourcycles](../rules/no-intl-locale-prototype-gethourcycles.md), [es-x/no-intl-locale-prototype-getnumberingsystems](../rules/no-intl-locale-prototype-getnumberingsystems.md), [es-x/no-intl-locale-prototype-gettextinfo](../rules/no-intl-locale-prototype-gettextinfo.md), [es-x/no-intl-locale-prototype-gettimezones](../rules/no-intl-locale-prototype-gettimezones.md), and [es-x/no-intl-locale-prototype-getweekinfo](../rules/no-intl-locale-prototype-getweekinfo.md).
11001100

11011101
```js
11021102
import pluginESx from "eslint-plugin-es-x"
@@ -1122,7 +1122,7 @@ export default [
11221122
disallow proposal ES2026 [JSON.parse source text access](https://github.com/tc39/proposal-json-parse-with-source)\
11231123
⚠️ This config will be changed in the minor versions of this plugin.
11241124

1125-
This configs includes rules for [es-x/no-json-israwjson](../rules/no-json-israwjson.md), [es-x/no-json-parse-reviver-context-parameter](../rules/no-json-parse-reviver-context-parameter.md), and [es-x/no-json-rawjson](../rules/no-json-rawjson.md).
1125+
This config includes the rules [es-x/no-json-israwjson](../rules/no-json-israwjson.md), [es-x/no-json-parse-reviver-context-parameter](../rules/no-json-parse-reviver-context-parameter.md), and [es-x/no-json-rawjson](../rules/no-json-rawjson.md).
11261126

11271127
```js
11281128
import pluginESx from "eslint-plugin-es-x"
@@ -1143,11 +1143,37 @@ export default [
11431143

11441144
</details>
11451145

1146+
## no-upsert
1147+
1148+
disallow proposal ES2026 [Upsert](https://github.com/tc39/proposal-upsert)\
1149+
⚠️ This config will be changed in the minor versions of this plugin.
1150+
1151+
This config includes the rules [es-x/no-map-prototype-getorinsert](../rules/no-map-prototype-getorinsert.md), [es-x/no-map-prototype-getorinsertcomputed](../rules/no-map-prototype-getorinsertcomputed.md), [es-x/no-weakmap-prototype-getorinsert](../rules/no-weakmap-prototype-getorinsert.md), and [es-x/no-weakmap-prototype-getorinsertcomputed](../rules/no-weakmap-prototype-getorinsertcomputed.md).
1152+
1153+
```js
1154+
import pluginESx from "eslint-plugin-es-x"
1155+
export default [
1156+
pluginESx.configs['flat/no-upsert']
1157+
]
1158+
```
1159+
1160+
<details><summary> Legacy Config </summary>
1161+
1162+
.eslintrc.*:
1163+
1164+
```json
1165+
{
1166+
"extends": ["plugin:es-x/no-upsert"],
1167+
}
1168+
```
1169+
1170+
</details>
1171+
11461172
## no-float16array
11471173

11481174
disallow proposal ES2025 [Float16Array](https://github.com/tc39/proposal-float16array)
11491175

1150-
This configs includes rules for [es-x/no-dataview-prototype-getfloat16-setfloat16](../rules/no-dataview-prototype-getfloat16-setfloat16.md), [es-x/no-float16array](../rules/no-float16array.md), and [es-x/no-math-f16round](../rules/no-math-f16round.md).
1176+
This config includes the rules [es-x/no-dataview-prototype-getfloat16-setfloat16](../rules/no-dataview-prototype-getfloat16-setfloat16.md), [es-x/no-float16array](../rules/no-float16array.md), and [es-x/no-math-f16round](../rules/no-math-f16round.md).
11511177

11521178
```js
11531179
import pluginESx from "eslint-plugin-es-x"
@@ -1172,7 +1198,7 @@ export default [
11721198

11731199
disallow proposal ES2025 [Import Attributes](https://github.com/tc39/proposal-import-attributes)
11741200

1175-
This configs includes rules for [es-x/no-dynamic-import-options](../rules/no-dynamic-import-options.md), [es-x/no-import-attributes](../rules/no-import-attributes.md), and [es-x/no-trailing-dynamic-import-commas](../rules/no-trailing-dynamic-import-commas.md).
1201+
This config includes the rules [es-x/no-dynamic-import-options](../rules/no-dynamic-import-options.md), [es-x/no-import-attributes](../rules/no-import-attributes.md), and [es-x/no-trailing-dynamic-import-commas](../rules/no-trailing-dynamic-import-commas.md).
11761202

11771203
```js
11781204
import pluginESx from "eslint-plugin-es-x"
@@ -1197,7 +1223,7 @@ export default [
11971223

11981224
disallow proposal ES2025 [Iterator Helpers](https://github.com/tc39/proposal-iterator-helpers)
11991225

1200-
This configs includes rules for [es-x/no-iterator-prototype-drop](../rules/no-iterator-prototype-drop.md), [es-x/no-iterator-prototype-every](../rules/no-iterator-prototype-every.md), [es-x/no-iterator-prototype-filter](../rules/no-iterator-prototype-filter.md), [es-x/no-iterator-prototype-find](../rules/no-iterator-prototype-find.md), [es-x/no-iterator-prototype-flatmap](../rules/no-iterator-prototype-flatmap.md), [es-x/no-iterator-prototype-foreach](../rules/no-iterator-prototype-foreach.md), [es-x/no-iterator-prototype-map](../rules/no-iterator-prototype-map.md), [es-x/no-iterator-prototype-reduce](../rules/no-iterator-prototype-reduce.md), [es-x/no-iterator-prototype-some](../rules/no-iterator-prototype-some.md), [es-x/no-iterator-prototype-take](../rules/no-iterator-prototype-take.md), [es-x/no-iterator-prototype-toarray](../rules/no-iterator-prototype-toarray.md), and [es-x/no-iterator](../rules/no-iterator.md).
1226+
This config includes the rules [es-x/no-iterator-prototype-drop](../rules/no-iterator-prototype-drop.md), [es-x/no-iterator-prototype-every](../rules/no-iterator-prototype-every.md), [es-x/no-iterator-prototype-filter](../rules/no-iterator-prototype-filter.md), [es-x/no-iterator-prototype-find](../rules/no-iterator-prototype-find.md), [es-x/no-iterator-prototype-flatmap](../rules/no-iterator-prototype-flatmap.md), [es-x/no-iterator-prototype-foreach](../rules/no-iterator-prototype-foreach.md), [es-x/no-iterator-prototype-map](../rules/no-iterator-prototype-map.md), [es-x/no-iterator-prototype-reduce](../rules/no-iterator-prototype-reduce.md), [es-x/no-iterator-prototype-some](../rules/no-iterator-prototype-some.md), [es-x/no-iterator-prototype-take](../rules/no-iterator-prototype-take.md), [es-x/no-iterator-prototype-toarray](../rules/no-iterator-prototype-toarray.md), and [es-x/no-iterator](../rules/no-iterator.md).
12011227

12021228
```js
12031229
import pluginESx from "eslint-plugin-es-x"
@@ -1222,7 +1248,7 @@ export default [
12221248

12231249
disallow proposal ES2025 [Set Methods for JavaScript](https://github.com/tc39/proposal-set-methods)
12241250

1225-
This configs includes rules for [es-x/no-set-prototype-difference](../rules/no-set-prototype-difference.md), [es-x/no-set-prototype-intersection](../rules/no-set-prototype-intersection.md), [es-x/no-set-prototype-isdisjointfrom](../rules/no-set-prototype-isdisjointfrom.md), [es-x/no-set-prototype-issubsetof](../rules/no-set-prototype-issubsetof.md), [es-x/no-set-prototype-issupersetof](../rules/no-set-prototype-issupersetof.md), [es-x/no-set-prototype-symmetricdifference](../rules/no-set-prototype-symmetricdifference.md), and [es-x/no-set-prototype-union](../rules/no-set-prototype-union.md).
1251+
This config includes the rules [es-x/no-set-prototype-difference](../rules/no-set-prototype-difference.md), [es-x/no-set-prototype-intersection](../rules/no-set-prototype-intersection.md), [es-x/no-set-prototype-isdisjointfrom](../rules/no-set-prototype-isdisjointfrom.md), [es-x/no-set-prototype-issubsetof](../rules/no-set-prototype-issubsetof.md), [es-x/no-set-prototype-issupersetof](../rules/no-set-prototype-issupersetof.md), [es-x/no-set-prototype-symmetricdifference](../rules/no-set-prototype-symmetricdifference.md), and [es-x/no-set-prototype-union](../rules/no-set-prototype-union.md).
12261252

12271253
```js
12281254
import pluginESx from "eslint-plugin-es-x"
@@ -1247,7 +1273,7 @@ export default [
12471273

12481274
disallow proposal ES2024 [Array Grouping](https://github.com/tc39/proposal-array-grouping)
12491275

1250-
This configs includes rules for [es-x/no-map-groupby](../rules/no-map-groupby.md) and [es-x/no-object-groupby](../rules/no-object-groupby.md).
1276+
This config includes the rules [es-x/no-map-groupby](../rules/no-map-groupby.md) and [es-x/no-object-groupby](../rules/no-object-groupby.md).
12511277

12521278
```js
12531279
import pluginESx from "eslint-plugin-es-x"
@@ -1272,7 +1298,7 @@ export default [
12721298

12731299
disallow proposal ES2024 [Well-Formed Unicode Strings](https://github.com/tc39/proposal-is-usv-string)
12741300

1275-
This configs includes rules for [es-x/no-string-prototype-iswellformed](../rules/no-string-prototype-iswellformed.md) and [es-x/no-string-prototype-towellformed](../rules/no-string-prototype-towellformed.md).
1301+
This config includes the rules [es-x/no-string-prototype-iswellformed](../rules/no-string-prototype-iswellformed.md) and [es-x/no-string-prototype-towellformed](../rules/no-string-prototype-towellformed.md).
12761302

12771303
```js
12781304
import pluginESx from "eslint-plugin-es-x"
@@ -1297,7 +1323,7 @@ export default [
12971323

12981324
disallow proposal ES2023 [Change Array by Copy](https://github.com/tc39/proposal-change-array-by-copy)
12991325

1300-
This configs includes rules for [es-x/no-array-prototype-toreversed](../rules/no-array-prototype-toreversed.md), [es-x/no-array-prototype-tosorted](../rules/no-array-prototype-tosorted.md), [es-x/no-array-prototype-tospliced](../rules/no-array-prototype-tospliced.md), and [es-x/no-array-prototype-with](../rules/no-array-prototype-with.md).
1326+
This config includes the rules [es-x/no-array-prototype-toreversed](../rules/no-array-prototype-toreversed.md), [es-x/no-array-prototype-tosorted](../rules/no-array-prototype-tosorted.md), [es-x/no-array-prototype-tospliced](../rules/no-array-prototype-tospliced.md), and [es-x/no-array-prototype-with](../rules/no-array-prototype-with.md).
13011327

13021328
```js
13031329
import pluginESx from "eslint-plugin-es-x"
@@ -1322,7 +1348,7 @@ export default [
13221348

13231349
disallow proposal ES2023 Intl API [Intl.NumberFormat V3](https://github.com/tc39/proposal-intl-numberformat-v3)
13241350

1325-
This configs includes rules for [es-x/no-intl-numberformat-prototype-formatrange](../rules/no-intl-numberformat-prototype-formatrange.md), [es-x/no-intl-numberformat-prototype-formatrangetoparts](../rules/no-intl-numberformat-prototype-formatrangetoparts.md), and [es-x/no-intl-pluralrules-prototype-selectrange](../rules/no-intl-pluralrules-prototype-selectrange.md).
1351+
This config includes the rules [es-x/no-intl-numberformat-prototype-formatrange](../rules/no-intl-numberformat-prototype-formatrange.md), [es-x/no-intl-numberformat-prototype-formatrangetoparts](../rules/no-intl-numberformat-prototype-formatrangetoparts.md), and [es-x/no-intl-pluralrules-prototype-selectrange](../rules/no-intl-pluralrules-prototype-selectrange.md).
13261352

13271353
```js
13281354
import pluginESx from "eslint-plugin-es-x"
@@ -1347,7 +1373,7 @@ export default [
13471373

13481374
disallow proposal ES2022 [Class Fields](https://github.com/tc39/proposal-class-fields)
13491375

1350-
This configs includes rules for [es-x/no-class-instance-fields](../rules/no-class-instance-fields.md), [es-x/no-class-private-fields](../rules/no-class-private-fields.md), [es-x/no-class-private-methods](../rules/no-class-private-methods.md), and [es-x/no-class-static-fields](../rules/no-class-static-fields.md).
1376+
This config includes the rules [es-x/no-class-instance-fields](../rules/no-class-instance-fields.md), [es-x/no-class-private-fields](../rules/no-class-private-fields.md), [es-x/no-class-private-methods](../rules/no-class-private-methods.md), and [es-x/no-class-static-fields](../rules/no-class-static-fields.md).
13511377

13521378
```js
13531379
import pluginESx from "eslint-plugin-es-x"
@@ -1372,7 +1398,7 @@ export default [
13721398

13731399
disallow proposal ES2022 [An .at() method on all the built-in indexables](https://github.com/tc39/proposal-relative-indexing-method)
13741400

1375-
This configs includes rules for [es-x/no-array-prototype-at](../rules/no-array-prototype-at.md) and [es-x/no-string-prototype-at](../rules/no-string-prototype-at.md).
1401+
This config includes the rules [es-x/no-array-prototype-at](../rules/no-array-prototype-at.md) and [es-x/no-string-prototype-at](../rules/no-string-prototype-at.md).
13761402

13771403
```js
13781404
import pluginESx from "eslint-plugin-es-x"
@@ -1397,7 +1423,7 @@ export default [
13971423

13981424
disallow proposal ES2020 [String.prototype.matchAll](https://github.com/tc39/proposal-string-matchall)
13991425

1400-
This configs includes rules for [es-x/no-string-prototype-matchall](../rules/no-string-prototype-matchall.md) and [es-x/no-symbol-matchall](../rules/no-symbol-matchall.md).
1426+
This config includes the rules [es-x/no-string-prototype-matchall](../rules/no-string-prototype-matchall.md) and [es-x/no-symbol-matchall](../rules/no-symbol-matchall.md).
14011427

14021428
```js
14031429
import pluginESx from "eslint-plugin-es-x"

docs/rules/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ There is a config that enables the rules in this category: [`no-new-in-esnext`]
1818
| [es-x/no-json-israwjson](./no-json-israwjson.md) | disallow the `JSON.isRawJSON` method. | |
1919
| [es-x/no-json-parse-reviver-context-parameter](./no-json-parse-reviver-context-parameter.md) | disallow the `context` parameter in `JSON.parse` reviver function. | |
2020
| [es-x/no-json-rawjson](./no-json-rawjson.md) | disallow the `JSON.rawJSON` method. | |
21+
| [es-x/no-map-prototype-getorinsert](./no-map-prototype-getorinsert.md) | disallow the `Map.prototype.getOrInsert` method. | |
22+
| [es-x/no-map-prototype-getorinsertcomputed](./no-map-prototype-getorinsertcomputed.md) | disallow the `Map.prototype.getOrInsertComputed` method. | |
2123
| [es-x/no-math-sumprecise](./no-math-sumprecise.md) | disallow the `Math.sumPrecise` method. | |
2224
| [es-x/no-suppressederror](./no-suppressederror.md) | disallow the `SuppressedError` class. | |
2325
| [es-x/no-symbol-asyncdispose](./no-symbol-asyncdispose.md) | disallow the `Symbol.asyncDispose` property. | |
@@ -29,6 +31,8 @@ There is a config that enables the rules in this category: [`no-new-in-esnext`]
2931
| [es-x/no-uint8array-prototype-tobase64](./no-uint8array-prototype-tobase64.md) | disallow the `Uint8Array.prototype.toBase64` method. | |
3032
| [es-x/no-uint8array-prototype-tohex](./no-uint8array-prototype-tohex.md) | disallow the `Uint8Array.prototype.toHex` method. | |
3133
| [es-x/no-using-declarations](./no-using-declarations.md) | disallow `using` and `await using` declarations. | |
34+
| [es-x/no-weakmap-prototype-getorinsert](./no-weakmap-prototype-getorinsert.md) | disallow the `WeakMap.prototype.getOrInsert` method. | |
35+
| [es-x/no-weakmap-prototype-getorinsertcomputed](./no-weakmap-prototype-getorinsertcomputed.md) | disallow the `WeakMap.prototype.getOrInsertComputed` method. | |
3236

3337
## ES2026 Intl API
3438

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: "es-x/no-map-prototype-getorinsert"
3+
description: "disallow the `Map.prototype.getOrInsert` method"
4+
---
5+
6+
# es-x/no-map-prototype-getorinsert
7+
> disallow the `Map.prototype.getOrInsert` method
8+
9+
- ❗ <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge>
10+
- ✅ The following configurations enable this rule: [no-new-in-esnext] and [no-upsert]
11+
12+
This rule reports ES2026 [`Map.prototype.getOrInsert` method](https://github.com/tc39/proposal-upsert) as errors.
13+
14+
## 💡 Examples
15+
16+
⛔ Examples of **incorrect** code for this rule:
17+
18+
<eslint-playground type="bad">
19+
20+
```js
21+
/*eslint es-x/no-map-prototype-getorinsert: error */
22+
const foo = new Map();
23+
foo.getOrInsert(key, value);
24+
```
25+
26+
</eslint-playground>
27+
28+
## 🔧 Options
29+
30+
This rule has an option.
31+
32+
```jsonc
33+
{
34+
"rules": {
35+
"es-x/no-map-prototype-getorinsert": [
36+
"error",
37+
{
38+
"aggressive": false,
39+
"allowTestedProperty": false
40+
}
41+
]
42+
}
43+
}
44+
```
45+
46+
### aggressive: boolean
47+
48+
Configure the aggressive mode for only this rule.
49+
This is prior to the `settings['es-x'].aggressive` setting.
50+
51+
### allowTestedProperty: boolean
52+
53+
Configure the allowTestedProperty mode for only this rule.
54+
This is prior to the `settings['es-x'].allowTestedProperty` setting.
55+
56+
## 📚 References
57+
58+
- [Rule source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/lib/rules/no-map-prototype-getorinsert.js)
59+
- [Test source](https://github.com/eslint-community/eslint-plugin-es-x/blob/master/tests/lib/rules/no-map-prototype-getorinsert.js)
60+
61+
[no-new-in-esnext]: ../configs/index.md#no-new-in-esnext
62+
[no-upsert]: ../configs/index.md#no-upsert

0 commit comments

Comments
 (0)