prettier-vscode: eslintIntegration. Cannot read property 'sync' of undefined
It’s the first time I’m trying to set it up, so I might have skipped something obvious, but can’t figure it out.
After CMD + Shift + P -> Format Document , it shows in the Output tab:
Cannot read property ‘sync’ of undefined
I just installed the extension today, version 0.24 Settings of the plugin: { “prettier.eslintIntegration”: true }
prettier 1.6.1 eslint 4.8.0 . (installed globally)
.eslintrc content is:
{
"extends": [
"plugin:react/recommended"
],
"plugins": [ "react" ],
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
}
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 23 (10 by maintainers)
Commits related to this issue
- fix(dependencies): Prettier bump Local prettier package needs a bump to solve https://github.com/prettier/prettier-vscode/issues/235 — committed to danseethaler/patternfly-react by danseethaler 7 years ago
- fix(dependencies): Prettier bump Local prettier package needs a bump to solve https://github.com/prettier/prettier-vscode/issues/235 — committed to danseethaler/patternfly-react by danseethaler 7 years ago
ctrl
+shift
+p
->Reload Window
This should work
Try adding this to workspace settings.
{ "prettier.eslintIntegration": false}
This worked for mePrettier
1.7.0
has thesync()
function that is missing here (1.6.1
)https://github.com/prettier/prettier/commit/088aa71b07bc25bc3640b1e188ec906ef6d17b1b