New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prettier not working since the latest create-nuxt-app release #9563
Comments
|
fyi, I have a pending PR to replace |
|
I apologize for any disturbance caused by the PR I created. Please check this comment. |
|
Could you please clarify if there is any reason why do you want to use Prettier through ESlint and not directly? As part of my PR I was trying to address a different issue, but it's likely that we'll keep the existing behavior of using only 'prettier' plugin, as it's more standard and recommended by Prettier. We should at least add a lintfix script that includes prettier to the create-nuxt-app template if it won't be covered by eslint's own |
|
Here are some advantages of using it directly through ESlint: https://stackoverflow.com/a/68880413/8816585 |
|
Thanks for your contribution to Nuxt!
Issues that are labeled as |
|
Would you raise this at https://github.com/nuxt/create-nuxt-app/ if it is still relevant? 🙏 |
Versions
2.15.714.15.0Reproduction
I've created a new Nuxt project with the latest version thanks to
npxwith the following configurationI could not have a working Prettier with the configuration of the repo.
create-nuxt-apprelease.My initial file to format looks like this
How to solve the issue
After some tests, I found the culprit in
.eslintrc.js, this is the current configuration generated by the CLIThis is the one that do actually work as before
Then, it formats my file properly
I did not hosted it on codesandbox, but the repo can be found on Github.
yarn add -D eslint-plugin-prettierto have it working.The text was updated successfully, but these errors were encountered: