prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.34k stars 251 forks source link

TypeError: prettier.getFileInfo.sync is not a function #257

Closed ariesclark closed 1 year ago

ariesclark commented 1 year ago

Version 3 of Prettier breaks this plugin.

TypeError: prettier.getFileInfo.sync is not a function
Occurred while linting /.../src/components/inline-link.tsx:1
Rule: "prettier/prettier"
    at Program (/.../node_modules/.../eslint-plugin-prettier/eslint-plugin-prettier.js:143:70)
    at ruleErrorHandler (/.../node_modules/.../eslint/lib/linter/linter.js:1050:28)
    at /.../node_modules/.../eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)

In 3.0.0 release notes:

prettier.getFileInfo.sync is removed See: https://prettier.io/blog/2023/07/05/3.0.0.html#api-1

JounQin commented 1 year ago

Duplicate with #255