{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/869","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/869/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/869/events","html_url":"https://github.com/facebook/flow/issues/869","id":108718707,"number":869,"title":"Don't typecheck or load files under node_modules/ unless they're imported by flow-typed files","user":{"login":"AgentME","id":577345,"avatar_url":"https://avatars0.githubusercontent.com/u/577345?v=4","gravatar_id":"","url":"https://api.github.com/users/AgentME","html_url":"https://github.com/AgentME","followers_url":"https://api.github.com/users/AgentME/followers","following_url":"https://api.github.com/users/AgentME/following{/other_user}","gists_url":"https://api.github.com/users/AgentME/gists{/gist_id}","starred_url":"https://api.github.com/users/AgentME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgentME/subscriptions","organizations_url":"https://api.github.com/users/AgentME/orgs","repos_url":"https://api.github.com/users/AgentME/repos","events_url":"https://api.github.com/users/AgentME/events{/privacy}","received_events_url":"https://api.github.com/users/AgentME/received_events","type":"User","site_admin":false},"labels":[{"id":427162940,"url":"https://api.github.com/repos/facebook/flow/labels/DX","name":"DX","color":"123456","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":103,"created_at":"2015-09-28T18:27:00Z","updated_at":"2017-10-12T09:58:22Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Most of the files under node_modules aren't the responsibility of my project, errors in them are probably due to them being written for a different Flow version, and the only reason to parse them would be if my project has flow-typed files referring to types in them.\n\nIt seems like a common issue is that Flow takes longer to start up than it ought to because it reads all of the javascript files under node_modules/ when the user isn't interested in typechecking most of them (#863). Tons of files under node_modules/ are sub-dependencies of other non-Flow-typed dependencies. People can manually ignore individual dependencies to speed things up ([example](https://github.com/hammerlab/pileup.js/pull/269/files)), but this loses its effectiveness with the newly-released npm 3 because now dependencies aren't usually nested. (Browserify's many dependencies are now placed directly under node_modules/ instead of node_modules/browserify/node_modules/, so ignoring `.*node_modules/browserify.*` is no longer nearly as effective.)\n\nIt makes sense to check the flow types of files under node_modules/ if they're imported by flow-typed files in the project itself, and maybe the types of the files those ones include if it's necessary to fully figure out their types, but I think most/all users would prefer that files under node_modules/ would not be even loaded for typechecking unless they're imported by a flow-typed file in the project proper. Maybe this could be a (default-on?) setting in `.flowconfig`.\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/336081123","html_url":"https://github.com/facebook/flow/issues/869#issuecomment-336081123","issue_url":"https://api.github.com/repos/facebook/flow/issues/869","id":336081123,"user":{"login":"jlpiedrahita","id":1379779,"avatar_url":"https://avatars1.githubusercontent.com/u/1379779?v=4","gravatar_id":"","url":"https://api.github.com/users/jlpiedrahita","html_url":"https://github.com/jlpiedrahita","followers_url":"https://api.github.com/users/jlpiedrahita/followers","following_url":"https://api.github.com/users/jlpiedrahita/following{/other_user}","gists_url":"https://api.github.com/users/jlpiedrahita/gists{/gist_id}","starred_url":"https://api.github.com/users/jlpiedrahita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlpiedrahita/subscriptions","organizations_url":"https://api.github.com/users/jlpiedrahita/orgs","repos_url":"https://api.github.com/users/jlpiedrahita/repos","events_url":"https://api.github.com/users/jlpiedrahita/events{/privacy}","received_events_url":"https://api.github.com/users/jlpiedrahita/received_events","type":"User","site_admin":false},"created_at":"2017-10-12T09:58:22Z","updated_at":"2017-10-12T09:58:22Z","author_association":"NONE","body":"@apsavin @lll000111 And because then another kind of errors arise: `Required module not found`, `Required module not found`, `Required module not found`."}}
{"actor":{"display_login":"jlpiedrahita"}}