Closed jcphua closed 1 year ago
@jcphua This is an issue with @rushstack/eslint-patch
. An issue has been created on their repository page. In the meantime, you can find the fix explained here.
The issue cannot be fixed by the extension since it's using local node_modules
so the patch file needs to be created locally. I could perhaps have a command that can run to create the patched file locally. Would a FAQ in discussions for this error and other other common errors help? Or I could update the Troubleshooting area to include the error message and what to do about it.
@idahogurl Thanks for providing the link to the manual/local fix.
For visibility, and others facing the same issue maybe it's a good idea to mention it in FAQ/other documentation, but since you've supplied the details on the issue and fix, I'm happy for this issue to be closed.
Cheers!
Describe the bug
Basic functionality of formatting on save does not work for TypeScript project. The immediate error seen in the Prettier Eslint output is:
To Reproduce
create-react-app
project with TypeScript as template (from macos CLI):npx create-react-app cra-typescript --template typescript
.Followed the installation instructions from the
vs-code-prettier-eslint
extension README: a.npm i -D prettier eslint @typescript-eslint/parser
b. Updatedsettings.json
exactly according to instructions:However even attempting a simple save of file
src/App.tsx
at this point (no change to the default generated boilerplate contents of this file), and also not yet beginning setup of prettier or eslint config files/properties), seemingly has no effect.The only indicator of a failure is when viewing VSCode Output pane (with Prettier Eslint output selected), you see the following:
Have performed the same preliminary steps as per above on a default CRA (non-TypeScript) project (via
npx create-react-app cra-javascript
) and can see successful formatting on save and no errors on output, so my local environment does not appear to be the issue.Expected behavior
No errors in output pane, successful indentation/formatting on save of TypeScript file.
Example Project
npx create-react-app cra-typescript --template typescript
)package.json
Versions (please complete the following information):
5.0.4
1.76.1
16.17.0
8.19.2
2.8.4
8.35.0
5.0.1
System Specifications (please complete the following information):