Cannot configure eslint-config-vuetify and eslint-config-prettier
I followed docs here to create an empty vuetify project.
https://vuetifyjs.com/en/getting-started/installation/#installation
So i used this command with following steps
`npm create vuetify@latest`
1. Project name >>> leave blank hit enter
2. Which preset would you like to install? >>> select default
3. Use Typescript? >>> select yes
4. Would you like to install dependencies with yarn, npm, pnpm, or bun? >>> select npm
5. Install Dependencies? >>> select yes
Now i have a brand new project with package json with `"eslint-config-vuetify": "4.2.0"`.
I added `"eslint-config-prettier": "10.1.8"` and `"prettier": "3.6.2"`.
I configured my prettierrc and done `npx prettier . --check`... everything fine.
So my package json have now
```json
"eslint-config-vuetify": "4.2.0",
"eslint-config-prettier": "10.1.8"
```
## Trying to configure eslint with prettier
### My eslint.config.js generated from create vuetify
```js
import vuetify from 'eslint-config-vuetify';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
export default vuetify();
```
### I tried this but wont work:
```js
import vuetify from 'eslint-config-vuetify';
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default [
...vuetify(),
eslintConfigPrettier
]
```
log error
```
eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix
Oops! Something went wrong! :(
ESLint: 9.38.0
TypeError: vuetify is not a function or its return value is not iterable
```
Attempt 2, after reading the log issue
```js
import vuetify from 'eslint-config-vuetify';
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default [
...vuetify,
eslintConfigPrettier
]
```
log error
```
eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix
Oops! Something went wrong! :(
ESLint: 9.38.0
TypeError: vuetify is not iterable
```
Copilot suggests this:
```js
import vuetify from 'eslint-config-vuetify';
export default vuetify({
vue: true,
ts: { preset: 'all' },
prettier: true
})
```
but wont work either
```
eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix
Oops! Something went wrong! :(
ESLint: 9.38.0
ConfigError: Config (unnamed): Unexpected key "vue" found.
```
Linked issue on vuetify: https://github.com/vuetifyjs/eslint-config-vuetify/issues/42
关闭于 2025-10-30 2 条评论