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

eslint-plugin-prettier version 3.1.1 and newest prettier version 3.2.5 mismatch causing issues #644

Closed
marcinskrzynski-knowde opened this issue Feb 5, 2024 · 2 comments
Labels

Comments

@marcinskrzynski-knowde
Copy link

What version of eslint are you using?
8.56.0

What version of prettier are you using?
3.2.5

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)

What source code are you linting?

<Comp
  prop={value}
  propThatCausingIssue={object.multiple.nestedAndPrettyLongOne?.find(
    (value) => value.key?.startsWith('string'),
  )}
/>

issue:

./src/component
130:79  Error: Insert `(value)·=>`  prettier/prettier
131:16  Error: Delete `·(value)·=>`  prettier/prettier

What did you expect to happen?

Eslint is okay with formatting by prettier 3.2.5

What actually happened?

Latest eslint-plugin-prettier package is using prettier prettier": "^3.1.1" but the newest version is 3.2.5. When you prettify your code using 3.2.5. in some cases (it's single case for me) eslint will report that code as missing prettier formatting.

@JounQin
Copy link
Member

JounQin commented Feb 6, 2024

"prettier": ">=3.0.0"

It's peer dependency. Check your lock file to make sure there is only one prettier installed, and remove related .eslintcache.

If you still have problems, please provide a runnable reproduction.

@JounQin JounQin closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@fantasy525
Copy link

image image

The first error prompted me to insert a semicolon and a newline, but when I fixed it with the first error, it prompted me to remove the newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants