prettier-eslint [ERROR]: prettier formatting failed due to a prettier error
prettier-eslint-cli [ERROR]: There was an error formatting "C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\src\stories\Button.stories.ts":
TypeError: Expected input to be a string, got object
at module.exports (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\indent-string\index.js:11:9)
at prettify (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\@prettier\eslint\dist\index.js:133:37)
at format (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\@prettier\eslint\dist\index.js:113:20)
at async C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\prettier-eslint-cli\dist\format-files.js:255:26
failure formatting 180 files with prettier-eslint
prettier-eslint-cli
version: 7.1.0prettier
version: 3.0.0eslint
version: 8.45.0Relevant code/config.
Nothing
What you did:
Executed npx prettier-eslint --write ./src/*/.ts
What happened:
Got this error
prettier-eslint [ERROR]: prettier formatting failed due to a prettier error prettier-eslint-cli [ERROR]: There was an error formatting "C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\src\stories\Button.stories.ts": TypeError: Expected
input
to be astring
, gotobject
at module.exports (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\indent-string\index.js:11:9) at prettify (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\@prettier\eslint\dist\index.js:133:37) at format (C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\@prettier\eslint\dist\index.js:113:20) at async C:\Users\PFE\WebstormProjects\plataforma-digital-a360-bitbucket\frontend\node_modules\prettier-eslint-cli\dist\format-files.js:255:26 failure formatting 180 files with prettier-eslintReproduction:
Just run the command with prettier 3.0.0
Suggested solution:
Update to support prettier 3.0.0 https://github.com/prettier/prettier-eslint/issues/920