Closed onmax closed 1 month ago
You should set standalone
to false
Hey, I have updated the repro with standalone
to false
, but it still happening. I pushed the repro to github again
Ran into the same issue @onmax. running the nuxt app first with npm run dev
fixed it for me.
Awesome thank you!
Now it seems to work, but now I get another weird eslint error:
maxi@maxi:~/personal/eslint-reproduction-bug$ nr lint:fix
> nuxt-app@ lint:fix /home/maxi/personal/eslint-reproduction-bug
> eslint . --fix
/home/maxi/personal/eslint-reproduction-bug/components/WelcomeItem.vue
2:33 error Parsing error: Unexpected token )
✖ 1 problem (1 error, 0 warnings)
ELIFECYCLE Command failed with exit code 1.
WelcomeItem.vue
```vue
{{heading}}
```
onmax/eslint-reproduction-bug
pnpm install
and pnpm dev
pnpm lint:fix
or pnpm lint
Did I misconfigured something? It is valid Vue as it is working as expected in local dev. Thank you for your response 😃
Describe the bug
Running
eslint
results in an error. I tried to follow the manual but got this error:Error
```bash maxi@maxi:~/personal/eslint-reproduction-bug$ nr lint:fix > nuxt-app@ lint:fix /home/maxi/personal/eslint-reproduction-bug > eslint . --fix Oops! Something went wrong! :( ESLint: 9.2.0 ConfigError: Config "antfu/imports/rules": Key "plugins": Cannot redefine plugin "import". at rethrowConfigError (/home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/@humanwhocodes+config-array@0.13.0/node_modules/@humanwhocodes/config-array/api.js:230:8) at /home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/@humanwhocodes+config-array@0.13.0/node_modules/@humanwhocodes/config-array/api.js:1032:5 at Array.reduce ()
at FlatConfigArray.getConfig (/home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/@humanwhocodes+config-array@0.13.0/node_modules/@humanwhocodes/config-array/api.js:1028:39)
at FlatConfigArray.isFileIgnored (/home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/@humanwhocodes+config-array@0.13.0/node_modules/@humanwhocodes/config-array/api.js:1060:15)
at /home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/eslint@9.2.0/node_modules/eslint/lib/eslint/eslint-helpers.js:346:57
at Array.reduce ()
at /home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/eslint@9.2.0/node_modules/eslint/lib/eslint/eslint-helpers.js:333:36
at /home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/eslint@9.2.0/node_modules/eslint/lib/eslint/eslint-helpers.js:296:32
at Object.isAppliedFilter (/home/maxi/personal/eslint-reproduction-bug/node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js:12:31)
ELIFECYCLE Command failed with exit code 2.
```
It's probably a misconfiguration or I've missed something, but after re-reading everything I've been unable to find where the fault lies. Thanks in advance for your reply!
Steps
cd eslint-reproduction-bug/
3.pnpm install
.pnpm run dev
.eslint
withpnpm i eslint
(as explained in the manual. I was expecting it to be installed automatically from the DevTools).eslint.config.mjs
add the@antfu/eslint-config
config.eslint
config innuxt.config.ts
.lint
andlint:fix
to package.jsonlint:fix
. It will also ask for the extraeslint
configuration I installed ("@unocss/eslint-plugin"
and"eslint-plugin-format"
).Reproduction
https://github.com/onmax/eslint-reproduction-bug
System Info
Used Package Manager
pnpm
Validations
Contributions