prettier-vscode icon indicating copy to clipboard operation
prettier-vscode copied to clipboard

Fix module resolution with `prettierPath` setting

Open cesaryuan opened this issue 1 year ago • 0 comments
trafficstars

  • [x] Run tests
  • [x] Update the CHANGELOG.md with a summary of your changes

This fix was once proposed in https://github.com/prettier/prettier-vscode/commit/d04b294a15f9dc20e1dc061013b57c7aa8f2764c, but was reverted in https://github.com/prettier/prettier-vscode/commit/f6ff18b500858b913ef43dbad73ecbae929c.

However, this is actually a misunderstanding. Let me analyze the entire process of the matter.

  1. #3041 This bug was first raised. The version of Prettier in the issue is 9.16.0
  2. #3042 This bug was subsequently fixed, and the fix was first released in version 9.17.0
  3. #3045 raised this bug again. The version of Prettier in the issue is also 9.16.0. However, at this time @ntotten mistakenly thought that this was caused by the change https://github.com/prettier/prettier-vscode/commit/d04b294a15f9dc20e1dc061013b57c7aa8f2764c, but this is obviously impossible, because https://github.com/prettier/prettier-vscode/commit/d04b294a15f9dc20e1dc061013b57c7aa8f2764c did not appear in the release version until 9.17.0. (I don’t mean to blame ntotten)
  4. At the same time, we can see in #3045 and #3041 that after the issue was closed, most people reported that the bug had not been fixed, which further illustrates what was reverted in https://github.com/prettier/prettier-vscode/commit/f6ff18b500858b913ef43dbad73ecbae929c3b27 is wrong.

Therefore, I am re-fixing this long-standing bug today. 🥰

cesaryuan avatar Jan 24 '24 09:01 cesaryuan