idahogurl / vs-code-prettier-eslint

A Visual Studio Code Extension to format JavaScript and TypeScript code using the prettier-eslint package.
MIT License
185 stars 46 forks source link

"Error while loading rule" error #170

Closed jackolas-lock closed 1 year ago

jackolas-lock commented 1 year ago

Describe the bug I have VSCode set to format on save. I am getting an error in the output console when saving, and my file is not formatted. Error: Error while loading rule 'react/no-did-update-set-state': Cannot read properties of undefined (reading 'uid')

Prior to today, the plugin formatted exactly how I wanted. I believe this has to do with the 1.79 update to VSCode, as I restarted today and received the auto update to 1.79. It seems to have broken Prettier. https://github.com/prettier/prettier-vscode/issues/3019 Documented in this issue, the Prettier plugin has a setting that will allow a workaround, by setting "prettier.prettierPath": "./node_modules/prettier". But the VSCode Prettier ESLint plugin does not seem to respect that setting.

To Reproduce Steps to reproduce the behavior:

  1. Update VSCode to version 1.79
  2. Attempt to format a file using Prettier ESLint
  3. See error in output console

Expected behavior File is formatted using ESLint and Prettier.

Versions:

idahogurl commented 1 year ago

@jackolas-lock Could you please downgrade for now? The fix you described for vscode-prettier isn't working for everyone.

jackolas-lock commented 1 year ago

Yes, I have downgraded for now and the plugin works again. The issue I linked and the fix within only works for the Prettier plugin, it does not look like I can ask this plugin to use that path setting. I just linked for your reference.

Thank you for this plugin, it is very helpful!

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.