Skip to content

Commit ced4886

Browse files
committed
docs: explain how to configure the Vue version
1 parent d7a157a commit ced4886

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Auto fix for formatting (aimed to be used standalone **without** Prettier)
77
- Sorted imports, dangling commas
88
- Reasonable defaults, best practices, only one line of config
9-
- Designed to work with TypeScript, JSX, Vue out-of-box
9+
- Designed to work with TypeScript, JSX, Vue 2 & 3 out-of-box
1010
- Lints also for json, yaml, toml, markdown
1111
- Opinionated, but [very customizable](#customization)
1212
- [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
@@ -356,6 +356,19 @@ export default antfu({
356356
})
357357
```
358358

359+
### Vue version
360+
361+
The default Vue version is 3, if you're using Vue 2:
362+
363+
```js
364+
// eslint.config.js
365+
import antfu from '@antfu/eslint-config'
366+
367+
export default antfu({
368+
vue: { vueVersion: 2 },
369+
})
370+
```
371+
359372
### Pipeline
360373

361374
Since v2.10.0, the factory function `antfu()` returns a [pipeline object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#pipe) where you can chain the methods to compose the config even more flexibly.

0 commit comments

Comments
 (0)