Closed alexeychikk closed 5 years ago
I'm also facing similar issue. Any plugin in plugins
errors out Cannot find module <module name>
.eslintrc ->
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"plugins": [
"prettier",
"react",
"jest"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"settings": {
"react": {
"createClass": "createReactClass",
"pragma": "React",
"version": "detect"
}
},
"rules": {
"react/destructuring-assignment": [2, "always", { "ignoreClassFields": true }],
"react/no-array-index-key": 2,
"react/no-unused-state": 2,
"react/no-unused-prop-types": 2,
"prettier/prettier": "error",
"no-nested-ternary": 2,
"semi": [2, "always"],
"prefer-destructuring": ["error", {"object": true, "array": true}],
"prefer-const": ["error", {
"destructuring": "any"
}],
"indent": ["error", 2, { "SwitchCase": 1 }],
"max-len": ["error", { "code": 120 }]
}
}
package.json ->
"eslint": "^6.0.0",
"eslint-config-prettier": "^5.0.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jest": "^22.7.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"prettier": "^1.18.2",
Same issue here. VS code throws me an error each time I try to format: This is only within vscode itself, the cli tool works perfectly using "prettier --write /somefile.js"
Some additional info: eslint debug shows no errors - eslint is working as intended Any plugin/extends throw the same error not only eslint-plugin-prettier Tried installing/uninstalling globally, same issue eveytime.
i donwgraded eslint to ^4.0.0 until a fix
I downgraded eslint to ^4.0.0
Works for me as well:
Try to remove everything from settings.json
. It should fix the problem.
i dont have any prettier related stuff in settings.json
this is my workspace settings.json file
{ "search.exclude": { "/.nuxt": true }, "files.watcherExclude": { "/.nuxt": true }, "files.exclude": { "**/.nuxt": true }, "vue-i18n-ally.localesPaths": "lang" }
What I did was to remove any reference to esLint on settings.json
I removed:
{
"prettier.eslintIntegration": true,
"eslint.enable": true,
}
and it worked fine
Duplicate of #870
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.
Extension is not working currently and outputs the following error
Cannot find module 'acorn'
. Reinstalling didn't help. It helped when I manually installedacorn
package in the project's folder even though my project doesn't depend on it.