{"action":"opened","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3127","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3127/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3127/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3127/events","html_url":"https://github.com/eslint/eslint/issues/3127","id":96593946,"number":3127,"title":"Set custom parser via CLIEngine options","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-22T15:24:31Z","updated_at":"2015-07-22T15:24:31Z","closed_at":null,"body":"Right now, there's not an easy way to set a custom parser via the node.js API.\r\n\r\nI expect this to work:\r\n\r\n```js\r\nvar CLIEngine = require(\"eslint\").CLIEngine;\r\nvar cli = new CLIEngine({\r\n    rules: {\r\n        semi: 2\r\n    },\r\n    parser: 'babel-eslint'\r\n});\r\nvar report = cli.executeOnFiles([\"myfile.js\", \"lib/\"]);\r\n```\r\n\r\nInstead I have to write the config file to disk and use the `configFile` option in order to get `CLIEngine` to recognize it."}}