{"action":"created","issue":{"url":"https://api.github.com/repos/azu/textlint/issues/19","labels_url":"https://api.github.com/repos/azu/textlint/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/azu/textlint/issues/19/comments","events_url":"https://api.github.com/repos/azu/textlint/issues/19/events","html_url":"https://github.com/azu/textlint/issues/19","id":106750981,"number":19,"title":"textlint-rule-*をロードするIFが欲しい","user":{"login":"1000ch","id":1800018,"avatar_url":"https://avatars.githubusercontent.com/u/1800018?v=3","gravatar_id":"","url":"https://api.github.com/users/1000ch","html_url":"https://github.com/1000ch","followers_url":"https://api.github.com/users/1000ch/followers","following_url":"https://api.github.com/users/1000ch/following{/other_user}","gists_url":"https://api.github.com/users/1000ch/gists{/gist_id}","starred_url":"https://api.github.com/users/1000ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1000ch/subscriptions","organizations_url":"https://api.github.com/users/1000ch/orgs","repos_url":"https://api.github.com/users/1000ch/repos","events_url":"https://api.github.com/users/1000ch/events{/privacy}","received_events_url":"https://api.github.com/users/1000ch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-16T11:07:08Z","updated_at":"2015-09-16T17:08:29Z","closed_at":null,"body":"Atomのプラグインを作りたいときに、Atomで開かれているディレクトリの`node_modules/textlint-rule-*`をtextlintにロードしてあげると、そのプロジェクトの`package.json`と`.textlintrc`に依存関係を完結させることが出来そうなので・・・。\r\n\r\nつまり、\r\nhttps://github.com/azu/textlint/blob/master/lib/textlint-engine.js#L65-L80\r\nあたりをTextLintEngineのインスタンスから実行したいです。\r\n\r\nhttps://github.com/1000ch/linter-textlint/blob/master/index.js#L20-L26"},"comment":{"url":"https://api.github.com/repos/azu/textlint/issues/comments/140806438","html_url":"https://github.com/azu/textlint/issues/19#issuecomment-140806438","issue_url":"https://api.github.com/repos/azu/textlint/issues/19","id":140806438,"user":{"login":"1000ch","id":1800018,"avatar_url":"https://avatars.githubusercontent.com/u/1800018?v=3","gravatar_id":"","url":"https://api.github.com/users/1000ch","html_url":"https://github.com/1000ch","followers_url":"https://api.github.com/users/1000ch/followers","following_url":"https://api.github.com/users/1000ch/following{/other_user}","gists_url":"https://api.github.com/users/1000ch/gists{/gist_id}","starred_url":"https://api.github.com/users/1000ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1000ch/subscriptions","organizations_url":"https://api.github.com/users/1000ch/orgs","repos_url":"https://api.github.com/users/1000ch/repos","events_url":"https://api.github.com/users/1000ch/events{/privacy}","received_events_url":"https://api.github.com/users/1000ch/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T17:08:29Z","updated_at":"2015-09-16T17:08:29Z","body":"@azu ありがとうございます。が、説明不足でした:bow:\r\n\r\n`tryResolve()`だとNodeの実行パス（`/Applications/Atom.app/Contents/Resources/app.asar/static`?）からモジュール辿ると思うので、Atomで開いているプロジェクトのパス（例えば`~/example-project`）にインストールされてる`~/example-project/node_modules/textlint-rule-max-ten`は参照できないかもです。\r\n\r\n`TextLintEngine.prototype.loadRule`の第二引数あたりにパスのコンテキストを渡せるようにして、渡された場合は、それ含めて`tryResolve`してもらえると良いかもしれません。こちらとしては、ですが。"}}