You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/index.md
+44-4Lines changed: 44 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -146,6 +146,48 @@ If you want to use custom parsers such as [@babel/eslint-parser](https://www.npm
146
146
}
147
147
```
148
148
149
+
Full example:
150
+
151
+
::: code-group
152
+
153
+
```json [.eslintrc]
154
+
{
155
+
"root": true,
156
+
"plugins": ["@typescript-eslint"],
157
+
"extends": [
158
+
"eslint:recommended",
159
+
"plugin:@typescript-eslint/recommended",
160
+
"plugin:vue/vue3-recommended"
161
+
],
162
+
"parser": "vue-eslint-parser",
163
+
"parserOptions": {
164
+
"parser": "@typescript-eslint/parser"
165
+
}
166
+
}
167
+
```
168
+
169
+
```js [eslint.config.js]
170
+
importjsfrom'@eslint/js'
171
+
importeslintPluginVuefrom'eslint-plugin-vue'
172
+
importtsfrom'typescript-eslint'
173
+
174
+
exportdefaultts.config(
175
+
js.configs.recommended,
176
+
...ts.configs.recommended,
177
+
...eslintPluginVue.configs['flat/recommended'],
178
+
{
179
+
files: ['*.vue', '**/*.vue'],
180
+
languageOptions: {
181
+
parserOptions: {
182
+
parser:'@typescript-eslint/parser'
183
+
}
184
+
}
185
+
}
186
+
)
187
+
```
188
+
189
+
:::
190
+
149
191
The `parserOptions.parser` option can also specify an object to specify multiple parsers. See [vue-eslint-parser README](https://github.com/vuejs/vue-eslint-parser#readme) for more details.
150
192
151
193
### How does ESLint detect components?
@@ -441,8 +483,7 @@ In [Nuxt 3](https://nuxt.com/) or with [`unplugin-auto-import`](https://github.c
441
483
442
484
::: code-group
443
485
444
-
```json [Legacy Config]
445
-
// .eslintrc
486
+
```json [.eslintrc]
446
487
{
447
488
"globals": {
448
489
"ref": "readonly",
@@ -454,8 +495,7 @@ In [Nuxt 3](https://nuxt.com/) or with [`unplugin-auto-import`](https://github.c
0 commit comments