prettier/prettier-eslint

TypeError: Expected `input` to be a `string`, got `object`

colin-oos opened this issue · 5 comments

Environments:

  • Prettier Version: 3.0.2
  • Running Prettier via: prettier-eslint-cli@7.1.0
  • Runtime: Node.js v18.15.0
  • Operating System: macOS
  • Prettier plugins (if any): eslint-plugin-prettier@5.0.0

Steps to reproduce:

Run prettier-eslint --write "$(pwd)/**/*.{js,jsx,ts,tsx}"

Expected behavior:

Process finished with exit code 0

Actual behavior:

Receiving the following output on each of my files:

prettier-eslint [ERROR]: prettier formatting failed due to a prettier error
prettier-eslint-cli [ERROR]: There was an error formatting "/Users/colhoop/Sources/UGP/tms/tms-frontend/custom.d.ts": 
    TypeError: Expected `input` to be a `string`, got `object`
        at module.exports (/Users/colhoop/Sources/UGP/tms/tms-frontend/node_modules/indent-string/index.js:11:9)
        at prettify (/Users/colhoop/Sources/UGP/tms/tms-frontend/node_modules/@prettier/eslint/dist/index.js:133:37)
        at format (/Users/colhoop/Sources/UGP/tms/tms-frontend/node_modules/@prettier/eslint/dist/index.js:113:20)
        at async /Users/colhoop/Sources/UGP/tms/tms-frontend/node_modules/prettier-eslint-cli/dist/format-files.js:255:26

transfered.

transfered.

Thanks, apologies for the wrong repo

⬇️ prettier to 2.8.8
Because 'prettier.format' in prettier@3 has changed return type.
Pull requests : #901

close in favor of #901, v16.0.0 has just been released!