{"action":"closed","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2331","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2331/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2331/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2331/events","html_url":"https://github.com/eslint/eslint/issues/2331","id":68993155,"number":2331,"title":" Plugin processors and CLIEngine API","user":{"login":"BenoitZugmeyer","id":61787,"avatar_url":"https://avatars.githubusercontent.com/u/61787?v=3","gravatar_id":"","url":"https://api.github.com/users/BenoitZugmeyer","html_url":"https://github.com/BenoitZugmeyer","followers_url":"https://api.github.com/users/BenoitZugmeyer/followers","following_url":"https://api.github.com/users/BenoitZugmeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenoitZugmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenoitZugmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenoitZugmeyer/subscriptions","organizations_url":"https://api.github.com/users/BenoitZugmeyer/orgs","repos_url":"https://api.github.com/users/BenoitZugmeyer/repos","events_url":"https://api.github.com/users/BenoitZugmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenoitZugmeyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"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"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-16T19:26:40Z","updated_at":"2015-06-03T22:24:30Z","closed_at":"2015-06-03T22:24:30Z","body":"Right now, plugin processors are only run when calling `executeOnFiles`. Yet, some external software may want to lint text chunks with `executeOnText`.\r\n\r\nHere is two legitimate use cases:\r\n* a text editor may want to lint unsaved code. It knows the file path and thus, the file extension from the previous save. See AtomLinter/linter-eslint#52\r\n* a bundler like grunt executing on text streams instead of rereading the file many time. See BenoitZugmeyer/eslint-plugin-html#2\r\n\r\n`executeOnText` may have a new optional argument, indicating the file path. If the path is known, it can be use to apply preprocessors on the text. Also, it could load the specific config file if any .eslintrc is in a parent directory of the file path.\r\n\r\nWhat do you think?"}}