Create-react-app: ESLint warnings within Atom editor. Cannot find module 'eslint-plugin-flowtype'

Created on 29 Jul 2016  路  9Comments  路  Source: facebook/create-react-app

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

Most helpful comment

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

All 9 comments

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

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

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鈥檚 end, and they intend to solve it: https://github.com/eslint/eslint/issues/3458.

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.

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?

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.

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.

Sure, happy to review and suggest changes etc.

Created PR on #348.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stopachka picture stopachka  路  3Comments

alleroux picture alleroux  路  3Comments

Evan-GK picture Evan-GK  路  3Comments

rdamian3 picture rdamian3  路  3Comments

ap13p picture ap13p  路  3Comments