{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6525","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6525/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6525/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6525/events","html_url":"https://github.com/eslint/eslint/issues/6525","id":162067427,"number":6525,"title":"Proposal for additional APIs","user":{"login":"ilyavolodin","id":1380062,"avatar_url":"https://avatars.githubusercontent.com/u/1380062?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyavolodin","html_url":"https://github.com/ilyavolodin","followers_url":"https://api.github.com/users/ilyavolodin/followers","following_url":"https://api.github.com/users/ilyavolodin/following{/other_user}","gists_url":"https://api.github.com/users/ilyavolodin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyavolodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyavolodin/subscriptions","organizations_url":"https://api.github.com/users/ilyavolodin/orgs","repos_url":"https://api.github.com/users/ilyavolodin/repos","events_url":"https://api.github.com/users/ilyavolodin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyavolodin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/core","name":"core","color":"c7def8"},{"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eslint/eslint/labels/evaluating","name":"evaluating","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-06-24T03:07:50Z","updated_at":"2016-08-10T00:29:21Z","closed_at":null,"body":"I would like to propose additional APIs. I'm not sure which object they should be attached to, as they don't seem to fit any of the current ones we have. Maybe `linter`, since they are all global.\r\n\r\n# `version`\r\nShould return current ESLint version. This is necessary to correctly invalidate session storage data in the online demo, and probably useful for tools as well\r\n\r\n# `getRules()`\r\nShould return all currently loaded rules. If `CLIEngine.addPlugin` has been called prior to this API call, it should also return rules from plugin. Return should be an array of object with rule name, rule schema and current configuration.\r\n\r\n# `getRuleMetadata(null|string)`\r\nShould return metadata for all currently loaded rules (plugins included). Can be merged with `getRules` command."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/238733308","html_url":"https://github.com/eslint/eslint/issues/6525#issuecomment-238733308","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6525","id":238733308,"user":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T00:29:20Z","updated_at":"2016-08-10T00:29:20Z","body":"@ilyavolodin sorry, I'm not sure what you're saying the problem is. Why can't I do this?\r\n\r\n```\r\nvar meta = engine.getRules().semi.meta;\r\n```\r\n\r\nI'm unclear on why plugin rules would be different from any other case. Wouldn't that just be this?\r\n\r\n```\r\nvar meta = engine.getRules()[\"plugin/rule\"].meta;\r\n```\r\n\r\nIf not, can you please be more descriptive and include some examples? I'm having trouble following this as an abstract idea."}}
{"actor":{"display_login":"nzakas"}}