Skip to content
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

TypeError: prettier.resolveConfig is not a function #647

Closed
ewx-mjanda opened this issue Mar 7, 2024 · 2 comments
Closed

TypeError: prettier.resolveConfig is not a function #647

ewx-mjanda opened this issue Mar 7, 2024 · 2 comments

Comments

@ewx-mjanda
Copy link

What version of eslint are you using?
8.43.0
What version of prettier are you using?
2.8.8
What version of eslint-plugin-prettier are you using?
5.1.3
Please paste any applicable config files that you're using (e.g. .prettierrc or .eslintrc files)
module.exports = {
root: true,
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./cloud/aws/tsconfig.json"],
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint", "prettier"],
rules: {
"@typescript-eslint/no-inferrable-types": "off",
},
};
What source code are you linting?
Typescript
What did you expect to happen?
command: pnpm eslint .
Expected successfuly lint report
What actually happened?
Oops! Something went wrong! :(

ESLint: 8.54.0

TypeError: prettier.resolveConfig is not a function
at /home/node/workspaces/webscraping/node_modules/.pnpm/eslint-plugin-prettier@5.1.3_eslint-config-prettier@8.10.0_eslint@8.54.0_prettier@2.8.8/node_modules/eslint-plugin-prettier/worker.js:40:24

@ewx-mjanda
Copy link
Author

The project is a Typescript monoreport with individual packages. We are working on implementing eslint in it now (so this is a new eslint setup on an exiting project).

@BPScott
Copy link
Member

BPScott commented Mar 7, 2024

Per the changelog eslint-plugin-prettier v5 only supports integration with prettier v3. If you require prettier v2 support then you should use eslint-plugin-prettier v4

@BPScott BPScott closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants