Skip to content

Commit f392389

Browse files
committed
Add editor section to document
1 parent 1c60edf commit f392389

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,28 @@ eslint --ext .js,.json src
9494
eslint "src/**/*.{js,json}"
9595
```
9696

97+
## Editor Integrations
98+
99+
### Visual Studio Code
100+
101+
Use the [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension that Microsoft provides officially.
102+
103+
You have to configure the `eslint.validate` option of the extension to check `.json` files, because the extension targets only `*.js` or `*.jsx` files by default.
104+
105+
Example **.vscode/settings.json**:
106+
107+
```json
108+
{
109+
"eslint.validate": [
110+
"javascript",
111+
"javascriptreact",
112+
"json",
113+
"jsonc",
114+
"json5"
115+
]
116+
}
117+
```
118+
97119
<!--USAGE_SECTION_END-->
98120

99121
## Rules

docs/user-guide/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,25 @@ Examples:
5353
eslint --ext .js,.json src
5454
eslint "src/**/*.{js,json}"
5555
```
56+
57+
## Editor Integrations
58+
59+
### Visual Studio Code
60+
61+
Use the [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension that Microsoft provides officially.
62+
63+
You have to configure the `eslint.validate` option of the extension to check `.json` files, because the extension targets only `*.js` or `*.jsx` files by default.
64+
65+
Example **.vscode/settings.json**:
66+
67+
```json
68+
{
69+
"eslint.validate": [
70+
"javascript",
71+
"javascriptreact",
72+
"json",
73+
"jsonc",
74+
"json5"
75+
]
76+
}
77+
```

0 commit comments

Comments
 (0)