Skip to content

Commit 821498f

Browse files
committed
docs: update Guide
1 parent 1adc96f commit 821498f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ This plugin never reports prototype methods by default. Because it's hard to kno
104104
If you configured the `aggressive` mode, this plugin reports prototype methods even if the rules couldn't know the type of objects.
105105
For example:
106106

107-
```json
107+
```js
108108
{
109-
"plugins": ["es-x"],
109+
"plugins": { "es-x": pluginESx },
110110
"rules": {
111111
"es-x/no-string-prototype-codepointat": "error"
112112
},
@@ -121,9 +121,9 @@ For example:
121121
If using this plugin and TypeScript, this plugin reports prototype methods by default because we can easily know types.
122122
For example:
123123

124-
```json
124+
```js
125125
{
126-
"plugins": ["es-x"],
126+
"plugins": { "es-x": pluginESx },
127127
"parser": "@typescript-eslint/parser",
128128
"parserOptions": {
129129
"project": "tsconfig.json"
@@ -164,9 +164,9 @@ function trimEnd(str) {
164164
If you configured the `allowTestedProperty` mode, this plugin will allow the use of tested properties.
165165
For example:
166166

167-
```json
167+
```js
168168
{
169-
"plugins": ["es-x"],
169+
"plugins": { "es-x": pluginESx },
170170
"rules": {
171171
"es-x/no-string-prototype-trimstart-trimend": "error",
172172
"es-x/no-string-prototype-trimleft-trimright": "error"

0 commit comments

Comments
 (0)