Closed shaunjanssens closed 4 years ago
same problem
same here
I guess the problem lies on the eslint version 6.x, it's incompatible with the current version of prettier-vscode.
same problem here
Also experiencing this issue
Same problem here
also experiencing this problem:
Same problem here
Same problem here
windows 10 64bit vscode 1.37.1 CRA 3.1.0
Must be a vscode issue
Same as @cemujax here
same problem
windows 10 create-react-app v3.1.1 vscode version 1.37.1
prettier 1.9.0 vscode 1.37.1 eslint-plugin-vue and eslint last version
I get Similar problem i got the error of 'Failed to load plugin 'vue' declared in........cant get module eslint-plugin-vue' but i already install it both as a dev dependency and global dependency.
https://github.com/facebook/react/issues/16531#issuecomment-523620795
rm -rf node_modules && npm i
and then restart vscode fixed it for me.
@tylergraf I do like you talk but I can't fix this issue
Yep facing same issue
same
I was able to correct this issue by deleting eslint-config-react-app
from node_modules
and reinstalling the newest version via npm i --save-dev eslint-config-react-app
.
OS: Windows 10 CRA: v3.1.1 VSCode: v1.37.1
I resolve this problem use "prettier.eslintIntegration": false
in my VSCode config
Thanks, @izayl. I fixed this issue like you
RIP productivity and sanity at work this week. Hope someone finds a proper fix
Duplicate of #870
Also disabled Prettier ESLint integration to fix the issue. When I disabled it (vis User Settings panel), it was marked as deprecated in orange text. Now when I go back to look at it, I'm pretty sure the setting is no longer there. Did a bit of reading on this as well: https://github.com/prettier/prettier-vscode#vscode-eslint-and-tslint-integration
Yeah I just narrowed down through trial and error that prettier eslint will not work on any project with react-scripts later than 3.0.1
Pretty devastating considering my entire workflow revolves around using this. So painful developing without it. I could imagine a lot of other people work this way as well.
I think it's a problem generating the template with NPX when you execute npx create-react-app app
. If you use create-react-app app
the problem doesn't occurs.
In my case ES lint was installed globally so I resolved it by installing the 'eslint-plugin-react-hooks' package globally.
This is the ES lint error report
This can happen for a couple of reasons:
- The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc).
- If ESLint is installed globally, then make sure 'eslint-plugin-react-hooks' is installed globally as well.
- If ESLint is installed locally, then 'eslint-plugin-react-hooks' isn't installed correctly.
@diljitvj Thanks ! Installed the 'eslint-plugin-react-hooks' globally with
npm i -g eslint-plugin-react-hooks
and everything is back to normal 💪
Changed prettier.eslintIntegration": true
to "prettier-eslint.eslintIntegration": true
in settings.json
Changed
prettier.eslintIntegration": true
to"prettier-eslint.eslintIntegration": true
in settings.json @nick-gaudreau When I set that in settings.json => Unknown Configuration Setting => Not working!
In my case ES lint was installed globally so I resolved it by installing the 'eslint-plugin-react-hooks' package globally.
This is the ES lint error report
This can happen for a couple of reasons:
- The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc).
- If ESLint is installed globally, then make sure 'eslint-plugin-react-hooks' is installed globally as well.
- If ESLint is installed locally, then 'eslint-plugin-react-hooks' isn't installed correctly.
It worked! Thanks @diljitvj
A temporary I did was to remove the eslintConfig in my package.json
"eslintConfig": {
"extends": "react-app"
},
prettier.eslintIntegration
is deprecated so I removed it from my VSCode settings
According to Prettier's documentation it's recommended to use the ESLint or TSLint extensions directly so I just use "eslint.autoFixOnSave": true
in my VSCode config and it is working well.
Here too... Any workaround?
@tupizz Try this => https://github.com/prettier/prettier-vscode/issues/910#issuecomment-525174068
lint.autoFixOnSave":
This setting works for me. There is an update on prettier website also about the deprecation and changes. Besides that, I installed 'eslint-plugin-react-hooks' globally.
here as well, I solved it by installing the 'eslint-plugin-react-hooks' npm package locally as dev dependency
"eslintConfig": { "extends": "react-app", "plugins": [ "react-hooks" ] },
@floroz That didn't seem to work for me :(
@floroz That didn't seem to work for me :(
I have gone through several steps:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Failed to format React files
I'm using VSCode - insiders and Remote - SSH to develop on a remote machine. When using
create-react-app
, Prettiers fails to format the files and gives an error.Steps To Reproduce:
npx create-react-app app
Expected result
Formatted file.
Actual result
Error by Prettier:
Additional information
VS Code Version: 1.38.0-insider
Prettier & Prettier Plugin Version: 1.18.2 (installed on server) / 1.9.0
OS and version: Mac OS and Ubuntu 18.04 (remote development)
React-scripts: 3.1.1
settings.json
I already tried to install
eslint-plugin-react-hooks
both as a dev dependency and global on server.