Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint warnings within Atom editor. Cannot find module 'eslint-plugin-flowtype' #272

Closed
manavsehgal opened this issue Jul 29, 2016 · 9 comments

Comments

@manavsehgal
Copy link
Contributor

I followed instructions to enable ESLint warnings within (Atom) editor. On opening a .js file in the editor I get this error.

Error: Failed to load plugin flowtype: Cannot find module 'eslint-plugin-flowtype' Referenced from: package.json
@andyeskridge
Copy link

I found I was hitting that issue too when using the linter-eslint package for atom. My work around was to first make sure that all of the required plugins were installed globally with npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype and then telling linter-eslint to use the global eslint installation

image

@manavsehgal
Copy link
Contributor Author

@andyeskridge thanks, your solution (checking - use global ESLint installation) fixed the error. Closing issue.

@gaearon
Copy link
Contributor

gaearon commented Jul 29, 2016

Please follow these instructions for integrating linting with your editor:

https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor

It is unfortunate that we require global installation but this is a problem on ESLint’s end, and they intend to solve it: eslint/eslint#3458.

@DiegoCardoso
Copy link
Contributor

Should the docs give that hint on the extra configuration at the ESLint plugin or is it too specific to Atom?
I am bringing this because as it is unchecked by default, the error wasn't entirely fixed after I installed the plugins globally.

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

They actually do give this hint.
Have you had a chance to look through the README generated in your project folder?
Is there something we can do to make it more discoverable?

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

Ugh, sorry, do you mean should the docs mention Atom plugin specifically? I think yes (we should mention major plugins and how to configure them). If you can send a PR that would he rad.

@DiegoCardoso
Copy link
Contributor

Yes, that what I meant.

This would be my very first PR, but I am more than pleasured to do. I think I'll would need some help, though, if you're up to.

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

Sure, happy to review and suggest changes etc.

@DiegoCardoso
Copy link
Contributor

Created PR on #348.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants