Open some-user123 opened 2 years ago
Same issue on our projects. Reading some of the readmes and linked projects, I'm wondering if the name for the extends has changed and the config needs to be updated from
extends: [
// other extends
'@vue/prettier/@typescript-eslint',
]
to:
extends: [
// other extends
'@vue/eslint-config-typescript/recommended',
]
I've changed it to "@vue/eslint-config-prettier" in my project and it appears to work
To get version 7.0.0 working, I had to do the following:
@rushstack/eslint-patch
(1.1.0; source: https://github.com/vuejs/eslint-config-prettier#installation ["recommend"?] )require("@rushstack/eslint-patch/modern-module-resolution");
to the top of .eslintrc.js
(source: https://github.com/vuejs/eslint-config-prettier#installation)extends: [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint",
],
to
extends: [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier",
],
Working example: https://github.com/jojomatik/blockcluster/commit/3009786a36e03ab3dfacb5b758f1baf096b3f014 Related workflow: https://github.com/jojomatik/blockcluster/runs/4732458806?check_suite_focus=true
I had to collect this information based on trial and error, browsing through the commits etc. I'm therefore not fully confident that it's entirely correct and don't know for sure that it contains the same rules as before. But I didn't notice any immediate problems.
It might be useful to add this to the changelog, release note and maybe the README file.
Is @rushstack/eslint-patch
strictly required? I needed it as otherwise an error message was thrown (prettier could not be resolved anymore). The README and release notes make it look, as if it were optional?
Ok, so, based on this, and being lazy, the only thing I did was replace:
"@vue/prettier/@typescript-eslint",
with
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier",
And everything seems to work just fine.
I have an odd issue.
If I keep this package as 6.0.0
, I get a no-undef
eslint error 'SubmitEvent' is not defined
. If I upgrade this package to 7.0.0
, that error goes away, but then I get the error Failed to load config "@vue/prettier/@typescript-eslint" to extend from. Referenced from: .eslintrc.js
. If I then try any of the solutions above, this error goes away, but the "SubmitEvent" error comes back.
Anyone have any idea what could be going on here? I'm confused. Why would this package affect typescript.
The SubmitEvent
interface was added to typescript
in 4.4
: https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029#issuecomment-869224737 I'm assuming somewhere in the package chain here, something's using an older version of typescript. Maybe it has something to do with vuejs/eslint-config-typescript using version 4.0
of typescript as a dev dependency?
Ok, so, based on this, and being lazy, the only thing I did was replace:
"@vue/prettier/@typescript-eslint",
with
"@vue/eslint-config-typescript", "@vue/eslint-config-prettier",
And everything seems to work just fine.
This works perfectly fine for me. Thx a lot :+1:
I recently upgraded @vue/eslint-config-prettier from 6.0.0 to 7.0.0.
Now eslint complains:
Can't get my head around this.
Changelog says "simplified the usage". What does this mean? How should I updated my .eslintrc.js?